Package com.sun.enterprise.deployment
Class MessageDestinationReferenceDescriptor
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- com.sun.enterprise.deployment.EnvironmentProperty
-
- com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor
-
- All Implemented Interfaces:
InjectionCapable,ApplicationParam,MessageDestinationReference,MessageDestinationReferencer,NamedInformation,ContextParameter,EnvironmentEntry,InitializationParameter,NameValuePair,WebDescriptor,Serializable
public class MessageDestinationReferenceDescriptor extends EnvironmentProperty implements MessageDestinationReference
An object representing the use of a message destination in a J2EE component.- Author:
- Kenneth Saks
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static StringCONSUMESstatic StringCONSUMES_PRODUCESstatic StringPRODUCES-
Fields inherited from class com.sun.enterprise.deployment.EnvironmentProperty
lookupName, mappedName
-
Fields inherited from class org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
Fields inherited from interface com.sun.enterprise.deployment.types.MessageDestinationReference
CONSUMES_AND_PRODUCES
-
-
Constructor Summary
Constructors Constructor Description MessageDestinationReferenceDescriptor()Constructs a reference in the extrernal state.MessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor other)copy constructorMessageDestinationReferenceDescriptor(String name, String desc)Construct an message destination reference with the given name and descriptor of the reference.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object object)Returns true if the argument is an environment property of the same name, false else.StringgetDestinationType()StringgetInjectResourceType()This is the class name of the type of resource that is to be injected.StringgetJndiName()EjbMessageBeanDescriptorgetMessageBeanOwner()Get the descriptor for the message-driven bean owner.MessageDestinationDescriptorgetMessageDestination()StringgetMessageDestinationLinkName()Gets the link name of the reference.MessageDestinationReferenceDescriptorgetMessageDestinationRefOwner()Get the descriptor for the message destination reference owner.BundleDescriptorgetReferringBundleDescriptor()Get the referring bundle, i.e.StringgetUsage()inthashCode()The hashCode of an environment property is the same as that of the name String.booleanisConflict(MessageDestinationReferenceDescriptor other)booleanisLinkedToMessageDestination()booleanownedByMessageBean()True if the owner is a message-driven bean.booleanownedByMessageDestinationRef()True if the owner is a message destination reference.voidprint(StringBuilder toStringBuilder)returns a formatted string representing me.MessageDestinationDescriptorresolveLinkName()Try to resolve the current link name value to a MessageDestination object.voidsetDestinationType(String type)voidsetInjectResourceType(String resourceType)voidsetJndiName(String physicalDestinationName)voidsetMessageDestination(MessageDestinationDescriptor newMsgDest)voidsetMessageDestinationLinkName(String linkName)Sets the name of the message destination to which I refer.MessageDestinationDescriptorsetMessageDestinationLinkName(String linkName, boolean resolveLink)Sets the name of the message destination to which I refer.voidsetReferringBundleDescriptor(BundleDescriptor referringBundle)Set the referring bundle, i.e.voidsetUsage(String destUsage)-
Methods inherited from class com.sun.enterprise.deployment.EnvironmentProperty
addInjectionTarget, getComponentEnvName, getInjectionTargets, getLookupName, getMappedName, getResolvedValue, getResolvedValueObject, getType, getValue, getValueObject, getValueType, hasAValue, hasInjectionTargetFromXml, hasLookupName, isConflict, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setLookupName, setMappedName, setType, setValue
-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri, visit
-
Methods inherited from class org.glassfish.deployment.common.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.sun.enterprise.deployment.types.MessageDestinationReference
getType, setType
-
Methods inherited from interface com.sun.enterprise.deployment.types.NamedInformation
getDescription, getName, setDescription, setName
-
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
-
Methods inherited from interface com.sun.enterprise.deployment.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
-
-
-
-
Field Detail
-
CONSUMES
public static final String CONSUMES
- See Also:
- Constant Field Values
-
PRODUCES
public static final String PRODUCES
- See Also:
- Constant Field Values
-
CONSUMES_PRODUCES
public static final String CONSUMES_PRODUCES
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MessageDestinationReferenceDescriptor
public MessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor other)
copy constructor
-
MessageDestinationReferenceDescriptor
public MessageDestinationReferenceDescriptor(String name, String desc)
Construct an message destination reference with the given name and descriptor of the reference.- Parameters:
name- the message-destination-ref name as used in the referencing componentoptional- description
-
MessageDestinationReferenceDescriptor
public MessageDestinationReferenceDescriptor()
Constructs a reference in the extrernal state.
-
-
Method Detail
-
getUsage
public String getUsage()
- Specified by:
getUsagein interfaceMessageDestinationReference- Returns:
- the usage type of the message destination reference (Consumes, Produces, ConsumesProduces)
-
setUsage
public void setUsage(String destUsage)
- Specified by:
setUsagein interfaceMessageDestinationReference- Parameters:
usage- the usage type of the message destination reference (Consumes, Produces, ConsumesProduces)
-
getDestinationType
public String getDestinationType()
-
setDestinationType
public void setDestinationType(String type)
-
getJndiName
public String getJndiName()
-
setJndiName
public void setJndiName(String physicalDestinationName)
-
getInjectResourceType
public String getInjectResourceType()
Description copied from interface:InjectionCapableThis is the class name of the type of resource that is to be injected.- Specified by:
getInjectResourceTypein interfaceInjectionCapable- Overrides:
getInjectResourceTypein classEnvironmentProperty
-
setInjectResourceType
public void setInjectResourceType(String resourceType)
- Specified by:
setInjectResourceTypein interfaceInjectionCapable- Overrides:
setInjectResourceTypein classEnvironmentProperty
-
setReferringBundleDescriptor
public void setReferringBundleDescriptor(BundleDescriptor referringBundle)
Set the referring bundle, i.e. the bundle within which this message destination reference is declared.- Specified by:
setReferringBundleDescriptorin interfaceMessageDestinationReference
-
getReferringBundleDescriptor
public BundleDescriptor getReferringBundleDescriptor()
Get the referring bundle, i.e. the bundle within which this message destination reference is declared.- Specified by:
getReferringBundleDescriptorin interfaceMessageDestinationReference
-
isLinkedToMessageDestination
public boolean isLinkedToMessageDestination()
- Specified by:
isLinkedToMessageDestinationin interfaceMessageDestinationReferencer- Returns:
- true if this referencer is linked to a message destination and false otherwise.
-
getMessageDestinationLinkName
public String getMessageDestinationLinkName()
Description copied from interface:MessageDestinationReferencerGets the link name of the reference. Points to the associated message destination within the J2EE application. Can be NULL if link is not set.- Specified by:
getMessageDestinationLinkNamein interfaceMessageDestinationReferencer- Returns:
- the name of the message destination to which I refer
-
setMessageDestinationLinkName
public void setMessageDestinationLinkName(String linkName)
Sets the name of the message destination to which I refer.- Specified by:
setMessageDestinationLinkNamein interfaceMessageDestinationReferencer
-
setMessageDestinationLinkName
public MessageDestinationDescriptor setMessageDestinationLinkName(String linkName, boolean resolveLink)
Description copied from interface:MessageDestinationReferencerSets the name of the message destination to which I refer.- Specified by:
setMessageDestinationLinkNamein interfaceMessageDestinationReferencerresolveLink- if true, *try* to resolve link to the target message destination.- Returns:
- MessageDestination to which link was resolved, or null if link name resolution failed.
-
resolveLinkName
public MessageDestinationDescriptor resolveLinkName()
Description copied from interface:MessageDestinationReferencerTry to resolve the current link name value to a MessageDestination object.- Specified by:
resolveLinkNamein interfaceMessageDestinationReferencer- Returns:
- MessageDestination to which link was resolved, or null if link name resolution failed.
-
ownedByMessageDestinationRef
public boolean ownedByMessageDestinationRef()
Description copied from interface:MessageDestinationReferencerTrue if the owner is a message destination reference.- Specified by:
ownedByMessageDestinationRefin interfaceMessageDestinationReferencer
-
getMessageDestinationRefOwner
public MessageDestinationReferenceDescriptor getMessageDestinationRefOwner()
Get the descriptor for the message destination reference owner.- Specified by:
getMessageDestinationRefOwnerin interfaceMessageDestinationReferencer
-
ownedByMessageBean
public boolean ownedByMessageBean()
True if the owner is a message-driven bean.- Specified by:
ownedByMessageBeanin interfaceMessageDestinationReferencer
-
getMessageBeanOwner
public EjbMessageBeanDescriptor getMessageBeanOwner()
Get the descriptor for the message-driven bean owner.- Specified by:
getMessageBeanOwnerin interfaceMessageDestinationReferencer
-
getMessageDestination
public MessageDestinationDescriptor getMessageDestination()
- Specified by:
getMessageDestinationin interfaceMessageDestinationReferencer- Returns:
- the message destination to which I refer. Can be NULL.
-
setMessageDestination
public void setMessageDestination(MessageDestinationDescriptor newMsgDest)
- Specified by:
setMessageDestinationin interfaceMessageDestinationReferencer- Parameters:
messageDestiation- the message destination to which I refer.
-
print
public void print(StringBuilder toStringBuilder)
returns a formatted string representing me.- Overrides:
printin classEnvironmentProperty
-
isConflict
public boolean isConflict(MessageDestinationReferenceDescriptor other)
-
equals
public boolean equals(Object object)
Description copied from class:EnvironmentPropertyReturns true if the argument is an environment property of the same name, false else.- Overrides:
equalsin classEnvironmentProperty
-
hashCode
public int hashCode()
Description copied from class:EnvironmentPropertyThe hashCode of an environment property is the same as that of the name String.- Overrides:
hashCodein classEnvironmentProperty
-
-