com.sun.enterprise.deployment
Class EjbReferenceDescriptor

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.EjbReferenceDescriptor
All Implemented Interfaces:
InjectionCapable, NamedDescriptor, ApplicationParameter, EjbReference, NamedInformation, ContextParameter, EnvironmentEntry, InitializationParameter, NameValuePair, WebDescriptor, java.io.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 com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
EjbReferenceDescriptor()
          Constructs a reference in the extrernal state.
EjbReferenceDescriptor(EjbReferenceDescriptor other)
          copy constructor
EjbReferenceDescriptor(java.lang.String name, java.lang.String description, EjbDescriptor ejbDescriptor)
          Construct an remote ejb reference to the given ejb descriptor with the given name and descriptor of the reference.
EjbReferenceDescriptor(java.lang.String name, java.lang.String description, EjbDescriptor ejbDescriptor, boolean isLocal)
          constructs an local or remote ejb reference to the given ejb descriptor, the desciption and the name 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 getBeanClassName()
           
 EjbDescriptor getEjbDescriptor()
          return the ejb to whoch I refer.
 java.lang.String getEjbHomeInterface()
          Gets the home classname of the referee EJB.
 java.lang.String getEjbInterface()
          Gets the local or remote interface classname of the referee EJB.
 java.lang.String getHomeClassName()
          Gets the home classname of the referee EJB.
 java.lang.String getInjectResourceType()
          This is the class name of the type of resource that is to be injected.
 java.lang.String getJndiName()
          return the jndi name of the bean to which I refer.
 java.lang.String getLinkName()
          Gets the link name of the reference.
 java.lang.String getLookupName()
           
 BundleDescriptor getReferringBundleDescriptor()
          Get the referring bundle, i.e.
 java.lang.String getType()
          Retusn the type of the ejb to whioch I refer.
 java.lang.String getValue()
          Return the jndi name of the bean to which I refer.
 boolean hasJndiName()
           
 boolean hasLookupName()
           
 boolean isEJB30ClientView()
           
 boolean isLinked()
          return true if I know the name of the ejb to which I refer.
 boolean isLocal()
          Tests if the reference to the referree EJB is through local or remote interface
 void print(java.lang.StringBuffer toStringBuffer)
          returns a formatted string representing me.
 void setBeanClassName(java.lang.String remoteClassName)
          Sets the bean instance business interface classname of the bean to which I refer.
 void setEjbDescriptor(EjbDescriptor ejbDescriptor)
          Sets the ejb descriptor to which I refer.
 void setEjbHomeInterface(java.lang.String homeClassName)
          Sets the local or remote home classname of the referee EJB.
 void setEjbInterface(java.lang.String remoteClassName)
          Sets the local or remote bean interface classname of the referee EJB.
 void setHomeClassName(java.lang.String homeClassName)
          Sets the home classname of the bean to whcioh I refer.
 void setInjectResourceType(java.lang.String resourceType)
           
 void setJndiName(java.lang.String jndiName)
          Sets the jndi name of the bean tyo whoch I am referring.
 void setLinkName(java.lang.String linkName)
          Sets the name of the ejb to which I refer.
 void setLocal(boolean local)
          Set whether this EJB Reference uses local interfaces or remote
 void setLookupName(java.lang.String l)
           
 void setReferringBundleDescriptor(BundleDescriptor referringBundle)
          Set the referring bundle, i.e.
 void setType(java.lang.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, hashCode, hasInjectionTargetFromXml, isConflictResourceGroup, isInjectable, isSetValueCalled, printInjectableResourceInfo, setMappedName, 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.NamedInformation
getDescription, getName, setDescription, setName
 
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.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
 
Methods inherited from interface com.sun.enterprise.deployment.web.NameValuePair
getDescription, getName, setDescription, setName
 

Constructor Detail

EjbReferenceDescriptor

public EjbReferenceDescriptor(EjbReferenceDescriptor other)
copy constructor

Parameters:
other - handle to other EjbReferenceDescriptor to clone

EjbReferenceDescriptor

public EjbReferenceDescriptor(java.lang.String name,
                              java.lang.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 bean
description - optional description
ejbDescriptor - of the referenced bean

EjbReferenceDescriptor

public EjbReferenceDescriptor(java.lang.String name,
                              java.lang.String description,
                              EjbDescriptor ejbDescriptor,
                              boolean isLocal)
constructs an local or remote ejb reference to the given ejb descriptor, the desciption and the name of the reference

Parameters:
name - is the name of the reference
description - is a human readable description of the reference
ejbDescriptor - the referenced EJB
isLocal - true if the reference uses the local interfaces

EjbReferenceDescriptor

public EjbReferenceDescriptor()
Constructs a reference in the extrernal 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:
setReferringBundleDescriptor in interface EjbReference

getReferringBundleDescriptor

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

Specified by:
getReferringBundleDescriptor in interface EjbReference

setEjbDescriptor

public void setEjbDescriptor(EjbDescriptor ejbDescriptor)
Sets the ejb descriptor to which I refer.

Specified by:
setEjbDescriptor in interface EjbReference
Parameters:
ejbDescriptor - the ejb descriptor referenced, null if it is unknow at this time

setJndiName

public void setJndiName(java.lang.String jndiName)
Sets the jndi name of the bean tyo whoch I am referring.

Specified by:
setJndiName in interface NamedDescriptor
Specified by:
setJndiName in interface EjbReference
Parameters:
jndiName - the new JNDI name of the receiver.

hasJndiName

public boolean hasJndiName()
Specified by:
hasJndiName in interface EjbReference

isLinked

public boolean isLinked()
return true if I know the name of the ejb to which I refer.


getLinkName

public java.lang.String getLinkName()
Description copied from interface: EjbReference
Gets the link name of the reference. For use when linking to an EJB within a J2EE application.

Specified by:
getLinkName in interface EjbReference
Returns:
the name of the ejb to which I refer

setLinkName

public void setLinkName(java.lang.String linkName)
Sets the name of the ejb to which I refer.

Specified by:
setLinkName in interface EjbReference

getJndiName

public java.lang.String getJndiName()
return the jndi name of the bean to which I refer.

Specified by:
getJndiName in interface NamedDescriptor
Specified by:
getJndiName in interface EjbReference
Returns:
the jndi name for this ejb reference

getValue

public java.lang.String getValue()
Return the jndi name of the bean to which I refer.

Specified by:
getValue in interface NameValuePair
Overrides:
getValue in class EnvironmentProperty

setLookupName

public void setLookupName(java.lang.String l)
Overrides:
setLookupName in class EnvironmentProperty

getLookupName

public java.lang.String getLookupName()
Specified by:
getLookupName in interface EjbReference
Overrides:
getLookupName in class EnvironmentProperty

hasLookupName

public boolean hasLookupName()
Specified by:
hasLookupName in interface EjbReference
Overrides:
hasLookupName in class EnvironmentProperty

getEjbDescriptor

public EjbDescriptor getEjbDescriptor()
return the ejb to whoch I refer.

Specified by:
getEjbDescriptor in interface EjbReference

isLocal

public boolean isLocal()
Description copied from interface: EjbReference
Tests if the reference to the referree EJB is through local or remote interface

Specified by:
isLocal in interface EjbReference
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:
setLocal in interface EjbReference
Parameters:
local - true if the EJB reference use local interfaces

getType

public java.lang.String getType()
Retusn the type of the ejb to whioch I refer.

Specified by:
getType in interface EjbReference
Specified by:
getType in interface EnvironmentEntry
Overrides:
getType in class EnvironmentProperty
Returns:
the type of the EJB.

setType

public void setType(java.lang.String type)
Assigns the type of the ejb to whcoih I refer.

Specified by:
setType in interface EjbReference
Specified by:
setType in interface EnvironmentEntry
Overrides:
setType in class EnvironmentProperty

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

getHomeClassName

public java.lang.String getHomeClassName()
Gets the home classname of the referee EJB.


setHomeClassName

public void setHomeClassName(java.lang.String homeClassName)
Sets the home classname of the bean to whcioh I refer.


getBeanClassName

public java.lang.String getBeanClassName()
Returns:
the bean instance interface classname of the referee EJB.

setBeanClassName

public void setBeanClassName(java.lang.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 java.lang.String getEjbHomeInterface()
Gets the home classname of the referee EJB.

Specified by:
getEjbHomeInterface in interface EjbReference
Returns:
the class name of the EJB home.

setEjbHomeInterface

public void setEjbHomeInterface(java.lang.String homeClassName)
Sets the local or remote home classname of the referee EJB.

Specified by:
setEjbHomeInterface in interface EjbReference
Parameters:
homeClassName - the class name of the EJB home.

getEjbInterface

public java.lang.String getEjbInterface()
Gets the local or remote interface classname of the referee EJB.

Specified by:
getEjbInterface in interface EjbReference
Returns:
the classname of the EJB remote object.

setEjbInterface

public void setEjbInterface(java.lang.String remoteClassName)
Sets the local or remote bean interface classname of the referee EJB.

Specified by:
setEjbInterface in interface EjbReference
Parameters:
remoteClassName - the classname of the EJB remote object.

isEJB30ClientView

public boolean isEJB30ClientView()
Specified by:
isEJB30ClientView in interface EjbReference
Returns:
true if the EJB reference is a 30 client view

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.