com.sun.enterprise.deployment
Class MessageDestinationReferencerImpl

java.lang.Object
  extended by com.sun.enterprise.deployment.MessageDestinationReferencerImpl
All Implemented Interfaces:
MessageDestinationReferencer, java.io.Serializable

public class MessageDestinationReferencerImpl
extends java.lang.Object
implements MessageDestinationReferencer, java.io.Serializable

Shared implementation for deployment descriptor entities that can refer to a message destination. Each MessageDestinationReferencer has an owner. The owner can either be a MessageDestinationReference or a MessageDrivenBean.

Author:
Kenneth Saks
See Also:
Serialized Form

Constructor Summary
MessageDestinationReferencerImpl(Descriptor desc)
           
MessageDestinationReferencerImpl(MessageDestinationReferencerImpl other)
           
 
Method Summary
 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.
 boolean isLinkedToMessageDestination()
          True if this reference has been resolved to a valid MessageDestination object.
 boolean ownedByMessageBean()
          True if the owner is a message-driven bean.
 boolean ownedByMessageDestinationRef()
          True if the owner is a message destination reference.
 MessageDestinationDescriptor resolveLinkName()
          Try to resolve the current link name value to a MessageDestination object.
 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 resolve)
          Sets the name of the message destination to which I refer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MessageDestinationReferencerImpl

public MessageDestinationReferencerImpl(MessageDestinationReferencerImpl other)

MessageDestinationReferencerImpl

public MessageDestinationReferencerImpl(Descriptor desc)
Method Detail

ownedByMessageDestinationRef

public boolean ownedByMessageDestinationRef()
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

isLinkedToMessageDestination

public boolean isLinkedToMessageDestination()
True if this reference has been resolved to a valid MessageDestination object.

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 link name of the message destination to which I refer NOTE that this "link name" is potentially different from the actual name of the target message destination, since the message destination could be defined in a different module.

setMessageDestinationLinkName

public void setMessageDestinationLinkName(java.lang.String linkName)
Sets the name of the message destination to which I refer. NOTE : Does *NOT* attempt to resolve link name. Use alternate version of setMessageDestinationLinkName or resolveLink if link resolution is required.

Specified by:
setMessageDestinationLinkName in interface MessageDestinationReferencer

setMessageDestinationLinkName

public MessageDestinationDescriptor setMessageDestinationLinkName(java.lang.String linkName,
                                                                  boolean resolve)
Sets the name of the message destination to which I refer.

Specified by:
setMessageDestinationLinkName in interface MessageDestinationReferencer
Parameters:
resolve - 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()
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.

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.


Copyright © 2012 GlassFish Community. All Rights Reserved.