Package com.sun.enterprise.deployment
Class EjbReferenceDescriptor
- 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.EjbReferenceDescriptor
-
- All Implemented Interfaces:
InjectionCapable,NamedDescriptor,ApplicationParam,EjbReference,NamedInformation,ContextParameter,EnvironmentEntry,InitializationParameter,NameValuePair,WebDescriptor,Serializable
public class EjbReferenceDescriptor extends EnvironmentProperty implements EjbReference, NamedDescriptor
An object representing a link to another ejb.- Author:
- Jerome Dochez
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.sun.enterprise.deployment.EnvironmentProperty
mappedName
-
Fields inherited from class org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
-
Constructor Summary
Constructors Constructor Description EjbReferenceDescriptor()Constructs a reference in the exterrnal state.EjbReferenceDescriptor(EjbReferenceDescriptor other)copy constructorEjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor)Construct an remote ejb reference to the given ejb descriptor with the given name and descriptor of the reference.EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor, boolean isLocal)constructs an local or remote ejb reference to the given ejb descriptor, the description and the name 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.StringgetBeanClassName()EjbDescriptorgetEjbDescriptor()return the ejb to whoch I refer.StringgetEjbHomeInterface()Gets the home classname of the referee EJB.StringgetEjbInterface()Gets the local or remote interface classname of the referee EJB.StringgetHomeClassName()Gets the home classname of the referee EJB.StringgetInjectResourceType()This is the class name of the type of resource that is to be injected.StringgetJndiName()return the jndi name of the bean to which I refer.StringgetLinkName()Gets the link name of the reference.StringgetLookupName()Gets the lookup valueBundleDescriptorgetReferringBundleDescriptor()Get the referring bundle, i.e.StringgetType()Retusn the type of the ejb to whioch I refer.StringgetValue()Return the jndi name of the bean to which I refer.inthashCode()The hashCode of an environment property is the same as that of the name String.booleanhasJndiName()Returns true if the reference has a non-null non-zero length jndinamebooleanhasLookupName()Returns true if the lookup name is non-null and has a non-zero lengthbooleanisConflict(EjbReferenceDescriptor other)booleanisEJB30ClientView()booleanisLinked()return true if I know the name of the ejb to which I refer.booleanisLocal()Tests if the reference to the referree EJB is through local or remote interfacevoidprint(StringBuilder toStringBuilder)returns a formatted string representing me.voidsetBeanClassName(String remoteClassName)Sets the bean instance business interface classname of the bean to which I refer.voidsetEjbDescriptor(EjbDescriptor ejbDescriptor)Sets the ejb descriptor to which I refer.voidsetEjbHomeInterface(String homeClassName)Sets the local or remote home classname of the referee EJB.voidsetEjbInterface(String remoteClassName)Sets the local or remote bean interface classname of the referee EJB.voidsetHomeClassName(String homeClassName)Sets the home classname of the bean to whcioh I refer.voidsetInjectResourceType(String resourceType)voidsetJndiName(String jndiName)Sets the jndi name of the bean type which I am referring.voidsetLinkName(String linkName)Sets the name of the ejb to which I refer.voidsetLocal(boolean local)Set whether this EJB Reference uses local interfaces or remotevoidsetLookupName(String l)Sets the lookup namevoidsetReferringBundleDescriptor(BundleDescriptor referringBundle)Set the referring bundle, i.e.voidsetType(String type)Assigns the type of the ejb to whcoih I refer.-
Methods inherited from class com.sun.enterprise.deployment.EnvironmentProperty
addInjectionTarget, getComponentEnvName, getInjectionTargets, getMappedName, getResolvedValue, getResolvedValueObject, getValueObject, getValueType, hasAValue, hasInjectionTargetFromXml, isConflict, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setMappedName, 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.InjectionCapable
addInjectionTarget, getComponentEnvName, getInjectionTargets, isInjectable
-
Methods inherited from interface com.sun.enterprise.deployment.NamedDescriptor
getName
-
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
-
-
-
-
Constructor Detail
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(EjbReferenceDescriptor other)
copy constructor- Parameters:
other- handle to other EjbReferenceDescriptor to clone
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor)
Construct an remote ejb reference to the given ejb descriptor with the given name and descriptor of the reference.- Parameters:
name- the ejb-ref name as used in the referencing beandescription- optional descriptionejbDescriptor- of the referenced bean
-
EjbReferenceDescriptor
public EjbReferenceDescriptor(String name, String description, EjbDescriptor ejbDescriptor, boolean isLocal)
constructs an local or remote ejb reference to the given ejb descriptor, the description and the name of the reference- Parameters:
name- is the name of the referencedescription- is a human readable description of the referenceejbDescriptor- the referenced EJBisLocal- true if the reference uses the local interfaces
-
EjbReferenceDescriptor
public EjbReferenceDescriptor()
Constructs a reference in the exterrnal state.
-
-
Method Detail
-
setReferringBundleDescriptor
public void setReferringBundleDescriptor(BundleDescriptor referringBundle)
Set the referring bundle, i.e. the bundle within which this EJB reference is declared.- Specified by:
setReferringBundleDescriptorin interfaceEjbReference
-
getReferringBundleDescriptor
public BundleDescriptor getReferringBundleDescriptor()
Get the referring bundle, i.e. the bundle within which this EJB reference is declared.- Specified by:
getReferringBundleDescriptorin interfaceEjbReference- Returns:
-
setEjbDescriptor
public void setEjbDescriptor(EjbDescriptor ejbDescriptor)
Sets the ejb descriptor to which I refer.- Specified by:
setEjbDescriptorin interfaceEjbReference- Parameters:
ejbDescriptor- the ejb descriptor referenced, null if it is unknown at this time
-
setJndiName
public void setJndiName(String jndiName)
Sets the jndi name of the bean type which I am referring.- Specified by:
setJndiNamein interfaceEjbReference- Specified by:
setJndiNamein interfaceNamedDescriptor- Parameters:
jndiName- the new JNDI name of the receiver.
-
hasJndiName
public boolean hasJndiName()
Description copied from interface:EjbReferenceReturns true if the reference has a non-null non-zero length jndiname- Specified by:
hasJndiNamein interfaceEjbReference- Returns:
-
isLinked
public boolean isLinked()
return true if I know the name of the ejb to which I refer.
-
getLinkName
public String getLinkName()
Description copied from interface:EjbReferenceGets the link name of the reference. For use when linking to an EJB within a J2EE application.- Specified by:
getLinkNamein interfaceEjbReference- Returns:
- the name of the ejb to which I refer
-
setLinkName
public void setLinkName(String linkName)
Sets the name of the ejb to which I refer.- Specified by:
setLinkNamein interfaceEjbReference- Parameters:
linkName- the link name.
-
getJndiName
public String getJndiName()
return the jndi name of the bean to which I refer.- Specified by:
getJndiNamein interfaceEjbReference- Specified by:
getJndiNamein interfaceNamedDescriptor- Returns:
- the jndi name for this ejb reference
-
getValue
public String getValue()
Return the jndi name of the bean to which I refer.- Specified by:
getValuein interfaceNameValuePair- Overrides:
getValuein classEnvironmentProperty
-
setLookupName
public void setLookupName(String l)
Description copied from class:EnvironmentPropertySets the lookup name- Overrides:
setLookupNamein classEnvironmentProperty
-
getLookupName
public String getLookupName()
Description copied from class:EnvironmentPropertyGets the lookup value- Specified by:
getLookupNamein interfaceEjbReference- Overrides:
getLookupNamein classEnvironmentProperty- Returns:
- the lookupname or an empty string if not set
-
hasLookupName
public boolean hasLookupName()
Description copied from interface:EjbReferenceReturns true if the lookup name is non-null and has a non-zero length- Specified by:
hasLookupNamein interfaceEjbReference- Overrides:
hasLookupNamein classEnvironmentProperty- Returns:
- true if lookup is not null and non-zero length
-
getEjbDescriptor
public EjbDescriptor getEjbDescriptor()
return the ejb to whoch I refer.- Specified by:
getEjbDescriptorin interfaceEjbReference
-
isLocal
public boolean isLocal()
Description copied from interface:EjbReferenceTests if the reference to the referree EJB is through local or remote interface- Specified by:
isLocalin interfaceEjbReference- Returns:
- true if the EJB reference uses the local interfaces of the EJB
-
setLocal
public void setLocal(boolean local)
Set whether this EJB Reference uses local interfaces or remote- Specified by:
setLocalin interfaceEjbReference- Parameters:
local- true if the EJB reference use local interfaces
-
getType
public String getType()
Retusn the type of the ejb to whioch I refer.- Specified by:
getTypein interfaceEjbReference- Specified by:
getTypein interfaceEnvironmentEntry- Overrides:
getTypein classEnvironmentProperty- Returns:
- the type of the EJB.
-
setType
public void setType(String type)
Assigns the type of the ejb to whcoih I refer.- Specified by:
setTypein interfaceEjbReference- Specified by:
setTypein interfaceEnvironmentEntry- Overrides:
setTypein classEnvironmentProperty- Parameters:
type- the type of the EJB.
-
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
-
getHomeClassName
public String getHomeClassName()
Gets the home classname of the referee EJB.
-
setHomeClassName
public void setHomeClassName(String homeClassName)
Sets the home classname of the bean to whcioh I refer.
-
getBeanClassName
public String getBeanClassName()
- Returns:
- the bean instance interface classname of the referee EJB.
-
setBeanClassName
public void setBeanClassName(String remoteClassName)
Sets the bean instance business interface classname of the bean to which I refer. this interface is the local object or the remote interfaces depending if the reference is local or not.
-
getEjbHomeInterface
public String getEjbHomeInterface()
Gets the home classname of the referee EJB.- Specified by:
getEjbHomeInterfacein interfaceEjbReference- Returns:
- the class name of the EJB home.
-
setEjbHomeInterface
public void setEjbHomeInterface(String homeClassName)
Sets the local or remote home classname of the referee EJB.- Specified by:
setEjbHomeInterfacein interfaceEjbReference- Parameters:
homeClassName- the class name of the EJB home.
-
getEjbInterface
public String getEjbInterface()
Gets the local or remote interface classname of the referee EJB.- Specified by:
getEjbInterfacein interfaceEjbReference- Returns:
- the classname of the EJB remote object.
-
setEjbInterface
public void setEjbInterface(String remoteClassName)
Sets the local or remote bean interface classname of the referee EJB.- Specified by:
setEjbInterfacein interfaceEjbReference- Parameters:
remoteClassName- the classname of the EJB remote object.
-
isEJB30ClientView
public boolean isEJB30ClientView()
- Specified by:
isEJB30ClientViewin interfaceEjbReference- Returns:
- true if the EJB reference is a 30 client view
-
print
public void print(StringBuilder toStringBuilder)
returns a formatted string representing me.- Overrides:
printin classEnvironmentProperty
-
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
-
isConflict
public boolean isConflict(EjbReferenceDescriptor other)
-
-