com.sun.enterprise.deployment
Class MessageDestinationReferenceDescriptor

java.lang.Object
  extended by java.util.Observable
      extended by com.sun.enterprise.deployment.DynamicAttributesDescriptor
          extended by com.sun.enterprise.deployment.Descriptor
              extended by com.sun.enterprise.deployment.EnvironmentProperty
                  extended by com.sun.enterprise.deployment.MessageDestinationReferenceDescriptor
All Implemented Interfaces:
InjectionCapable, ApplicationParameter, MessageDestinationReference, MessageDestinationReferencer, NamedInformation, ContextParameter, EnvironmentEntry, InitializationParameter, NameValuePair, WebDescriptor, java.io.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
static java.lang.String CONSUMES
           
static java.lang.String CONSUMES_PRODUCES
           
static java.lang.String PRODUCES
           
 
Fields inherited from class com.sun.enterprise.deployment.EnvironmentProperty
lookupName, mappedName
 
Fields inherited from class com.sun.enterprise.deployment.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
MessageDestinationReferenceDescriptor()
          Constructs a reference in the extrernal state.
MessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor other)
          copy constructor
MessageDestinationReferenceDescriptor(java.lang.String name, java.lang.String desc)
          Construct an message destination reference with the given name and descriptor of the reference.
 
Method Summary
 boolean equals(java.lang.Object object)
          Returns true if the argument is an environment property of the same name, false else.
 java.lang.String getDestinationType()
           
 java.lang.String getInjectResourceType()
          This is the class name of the type of resource that is to be injected.
 java.lang.String getJndiName()
           
 EjbMessageBeanDescriptor getMessageBeanOwner()
          Get the descriptor for the message-driven bean owner.
 MessageDestinationDescriptor getMessageDestination()
           
 java.lang.String getMessageDestinationLinkName()
          Gets the link name of the reference.
 MessageDestinationReferenceDescriptor getMessageDestinationRefOwner()
          Get the descriptor for the message destination reference owner.
 BundleDescriptor getReferringBundleDescriptor()
          Get the referring bundle, i.e.
 java.lang.String getUsage()
           
 boolean isLinkedToMessageDestination()
           
 boolean ownedByMessageBean()
          True if the owner is a message-driven bean.
 boolean ownedByMessageDestinationRef()
          True if the owner is a message destination reference.
 void print(java.lang.StringBuffer toStringBuffer)
          returns a formatted string representing me.
 MessageDestinationDescriptor resolveLinkName()
          Try to resolve the current link name value to a MessageDestination object.
 void setDestinationType(java.lang.String type)
           
 void setInjectResourceType(java.lang.String resourceType)
           
 void setJndiName(java.lang.String physicalDestinationName)
           
 void setMessageDestination(MessageDestinationDescriptor newMsgDest)
           
 void setMessageDestinationLinkName(java.lang.String linkName)
          Sets the name of the message destination to which I refer.
 MessageDestinationDescriptor setMessageDestinationLinkName(java.lang.String linkName, boolean resolveLink)
          Sets the name of the message destination to which I refer.
 void setReferringBundleDescriptor(BundleDescriptor referringBundle)
          Set the referring bundle, i.e.
 void setUsage(java.lang.String destUsage)
           
 
Methods inherited from class com.sun.enterprise.deployment.EnvironmentProperty
addInjectionTarget, getComponentEnvName, getInjectionTargets, getLookupName, getMappedName, getResolvedValue, getResolvedValueObject, getType, getValue, getValueObject, getValueType, hasAValue, hashCode, hasInjectionTargetFromXml, hasLookupName, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setLookupName, setMappedName, setType, setValue
 
Methods inherited from class com.sun.enterprise.deployment.Descriptor
addDeploymentExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, 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 com.sun.enterprise.deployment.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.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
 
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
 

Field Detail

CONSUMES

public static final java.lang.String CONSUMES
See Also:
Constant Field Values

PRODUCES

public static final java.lang.String PRODUCES
See Also:
Constant Field Values

CONSUMES_PRODUCES

public static final java.lang.String CONSUMES_PRODUCES
See Also:
Constant Field Values
Constructor Detail

MessageDestinationReferenceDescriptor

public MessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor other)
copy constructor


MessageDestinationReferenceDescriptor

public MessageDestinationReferenceDescriptor(java.lang.String name,
                                             java.lang.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 component
optional - description

MessageDestinationReferenceDescriptor

public MessageDestinationReferenceDescriptor()
Constructs a reference in the extrernal state.

Method Detail

getUsage

public java.lang.String getUsage()
Specified by:
getUsage in interface MessageDestinationReference
Returns:
the usage type of the message destination reference (Consumes, Produces, ConsumesProduces)

setUsage

public void setUsage(java.lang.String destUsage)
Specified by:
setUsage in interface MessageDestinationReference
Parameters:
usage - the usage type of the message destination reference (Consumes, Produces, ConsumesProduces)

getDestinationType

public java.lang.String getDestinationType()

setDestinationType

public void setDestinationType(java.lang.String type)

getJndiName

public java.lang.String getJndiName()

setJndiName

public void setJndiName(java.lang.String physicalDestinationName)

getInjectResourceType

public java.lang.String getInjectResourceType()
Description copied from interface: InjectionCapable
This is the class name of the type of resource that is to be injected.

Specified by:
getInjectResourceType in interface InjectionCapable
Overrides:
getInjectResourceType in class EnvironmentProperty

setInjectResourceType

public void setInjectResourceType(java.lang.String resourceType)
Specified by:
setInjectResourceType in interface InjectionCapable
Overrides:
setInjectResourceType in class EnvironmentProperty

setReferringBundleDescriptor

public void setReferringBundleDescriptor(BundleDescriptor referringBundle)
Set the referring bundle, i.e. the bundle within which this message destination reference is declared.

Specified by:
setReferringBundleDescriptor in interface MessageDestinationReference

getReferringBundleDescriptor

public BundleDescriptor getReferringBundleDescriptor()
Get the referring bundle, i.e. the bundle within which this message destination reference is declared.

Specified by:
getReferringBundleDescriptor in interface MessageDestinationReference

isLinkedToMessageDestination

public boolean isLinkedToMessageDestination()
Specified by:
isLinkedToMessageDestination in interface MessageDestinationReferencer
Returns:
true if this referencer is linked to a message destination and false otherwise.

getMessageDestinationLinkName

public java.lang.String getMessageDestinationLinkName()
Description copied from interface: MessageDestinationReferencer
Gets 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:
getMessageDestinationLinkName in interface MessageDestinationReferencer
Returns:
the name of the message destination to which I refer

setMessageDestinationLinkName

public void setMessageDestinationLinkName(java.lang.String linkName)
Sets the name of the message destination to which I refer.

Specified by:
setMessageDestinationLinkName in interface MessageDestinationReferencer

setMessageDestinationLinkName

public MessageDestinationDescriptor setMessageDestinationLinkName(java.lang.String linkName,
                                                                  boolean resolveLink)
Description copied from interface: MessageDestinationReferencer
Sets the name of the message destination to which I refer.

Specified by:
setMessageDestinationLinkName in interface MessageDestinationReferencer
resolveLink - 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: MessageDestinationReferencer
Try to resolve the current link name value to a MessageDestination object.

Specified by:
resolveLinkName in interface MessageDestinationReferencer
Returns:
MessageDestination to which link was resolved, or null if link name resolution failed.

ownedByMessageDestinationRef

public boolean ownedByMessageDestinationRef()
Description copied from interface: MessageDestinationReferencer
True if the owner is a message destination reference.

Specified by:
ownedByMessageDestinationRef in interface MessageDestinationReferencer

getMessageDestinationRefOwner

public MessageDestinationReferenceDescriptor getMessageDestinationRefOwner()
Get the descriptor for the message destination reference owner.

Specified by:
getMessageDestinationRefOwner in interface MessageDestinationReferencer

ownedByMessageBean

public boolean ownedByMessageBean()
True if the owner is a message-driven bean.

Specified by:
ownedByMessageBean in interface MessageDestinationReferencer

getMessageBeanOwner

public EjbMessageBeanDescriptor getMessageBeanOwner()
Get the descriptor for the message-driven bean owner.

Specified by:
getMessageBeanOwner in interface MessageDestinationReferencer

getMessageDestination

public MessageDestinationDescriptor getMessageDestination()
Specified by:
getMessageDestination in interface MessageDestinationReferencer
Returns:
the message destination to which I refer. Can be NULL.

setMessageDestination

public void setMessageDestination(MessageDestinationDescriptor newMsgDest)
Specified by:
setMessageDestination in interface MessageDestinationReferencer
Parameters:
messageDestiation - the message destination to which I refer.

print

public void print(java.lang.StringBuffer toStringBuffer)
returns a formatted string representing me.

Overrides:
print in class EnvironmentProperty

equals

public boolean equals(java.lang.Object object)
Description copied from class: EnvironmentProperty
Returns true if the argument is an environment property of the same name, false else.

Overrides:
equals in class EnvironmentProperty


Copyright © 2012 GlassFish Community. All Rights Reserved.