|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.bea.adapter.spi.AbstractWLIResourceAdapter
Abstract Resource Adapter class that encapsulates the generic functionality across all adapters
Constructor Summary | |
protected |
AbstractWLIResourceAdapter()
Constructs a resource adapter instance. |
Method Summary | |
void |
addAdapterStatusListener(AdapterStatusListener listener)
Add a new AdapterStatusListener. |
void |
addConnectionFactory(String name,
javax.resource.cci.ConnectionFactory factory)
Add a ConnectionFactory with the given name into this ResourceAdapter |
protected void |
checkAndPutProperty(String name,
Object value)
|
void |
endpointActivation(MessageEndpointFactory mef,
ActivationSpec as)
Add a new subscription for inbound messages to this adapter instance. |
void |
endpointDeactivation(MessageEndpointFactory mef,
ActivationSpec as)
Remove a subscription for inbound messages that was previously given to this adapter instance. |
String |
getAdapterDescription()
The description for the adapter. |
String |
getAdapterEisType()
The type name of the EIS this adapter was built to communicate with. |
String |
getAdapterName()
The display name for the adapter. |
String |
getAdapterVendorName()
The vendor name for the adapter Basic adapter metadata; these come from a resource bundle, or the subclass implementation. |
String |
getAdapterVersion()
The version for the adapter Basic adapter metadata; these come from a resource bundle, or the subclass implementation. |
String |
getAdditionalLogContext()
|
javax.resource.cci.ConnectionFactory |
getConnectionFactory(String name)
Get the ConnectionFactory instance with the given name, which is being managed for this ResourceAdapter instance. |
Status |
getConnectionFactoryStatus(String name)
Get the status of a ConnectionFactory with the given name being managed by this adapter instance. |
String |
getCountryCode()
|
String |
getEventGeneratorClassName()
|
String |
getGUID()
Gets the ID of this adapter instance, or null if none has been given. |
String[] |
getInboundMessagingInstanceIDs()
Get the array of logical inbound messaging instance identifiers for this adapter instance, or null if none have been set. |
Status |
getInboundMessagingStatus()
Get the status of the inbound section of this adapter instance. |
String |
getLanguageCode()
|
String |
getLogConfigFile()
|
protected LogContext |
getLogContext()
Retrieves an object that determines the logging configuration for this instance in the logging framework. |
protected ILogger |
getLogger()
Retrieves an object used to log information to. |
String |
getLogLevel()
|
String |
getMessageBundleBase()
|
String |
getName()
Gets the name of this adapter instance, or null if none has been given. |
String |
getRootLogContext()
|
XAResource[] |
getXAResources(ActivationSpec[] specs)
|
protected void |
initAdapterMetaData(ResourceBundle resourceBundle)
Retrieves metadata about the resource adapter from a message bundle. |
protected void |
initializeLogResources()
Initializes resources needed by this instance to support localized logging after all base member variables have been initialized correctly by the application server. |
protected void |
internalValidate()
Internal validation routine to sanity check the current properties/config of this object. |
boolean |
isInboundMessagingEnabled()
Indicates if this adapter instance is configured to handle inbound messaging. |
boolean |
isValidState()
Indicates whether this WLIResourceAdapter instance has been configured with valid property information and has successfully executed the validate() method. |
Iterator |
listConnectionFactoryNames()
List the names of the ConnectionFactories being managed for this ResourceAdapter instance. |
protected void |
logInfo()
Writes information about 'this' instance to the underlying logger as a info message. |
void |
refreshInboundMessaging()
Set, after a call to start, whether this adapter instance should have its inbound messaging section active or not. |
void |
removeAdapterStatusListener(AdapterStatusListener listener)
Remove an existing AdapterStatusListener |
javax.resource.cci.ConnectionFactory |
removeConnectionFactory(String name)
Remove a ConnectionFactory with the given name from this ResourceAdapter. |
void |
resumeInboundMessaging()
Resume inbound messaging. |
protected void |
setAdapterDescription(String desc)
Set the adapter description (should be what you would use for description in wli-ra.xml). |
protected void |
setAdapterEisType(String type)
Set the adapter EIS type (should be what you would use for eis-type in wli-ra.xml) |
protected void |
setAdapterName(String name)
Set adapter name (should be what you would use for display-name in wli-ra.xml). |
protected void |
setAdapterVendorName(String vendor)
Set the adapter vendor name (should be what you would use for vendor-name in wli-ra.xml) |
protected void |
setAdapterVersion(String version)
Set the adapter version (should be what you would use for resourceadapter-version in wli-ra.xml) |
void |
setAdditionalLogContext(String strAdditionalLogContext)
Sets additional context information for identifying logging configuration. |
void |
setCountryCode(String countryCode)
|
void |
setEventGeneratorClassName(String eventGeneratorClassName)
|
void |
setGUID(String guid)
Sets the globally unique ID of this adapter instance. |
void |
setInboundMessagingEnabled(boolean newValue)
Set whether this adapter instance is configured to handle inbound messaging or not. |
void |
setInboundMessagingInstanceIDs(String[] instanceIDs)
Set an array of logical inbound messaging instance identifiers for this adapter instance. |
void |
setInboundMessagingStatus(Status status)
Change this adapter's status. |
void |
setLanguageCode(String languageCode)
|
void |
setLogConfigFile(String logConfigFile)
|
void |
setLogLevel(String strLogLevel)
Sets the log priority level for 'this' instance. |
void |
setMessageBundleBase(String messageBundleBase)
|
void |
setName(String name)
Sets the logical name of this adapter instance. |
protected void |
setResourceAdapterProperties()
Add standard properties required for all resource adapters |
void |
setRootLogContext(String strRootLogContext)
Sets the root log context for this factory. |
protected void |
setStandardResourceAdapterProperties()
|
void |
start(BootstrapContext bc)
Starts a resource adapter instance. |
protected void |
startInboundMessaging()
Start the inbound messaging section of this adapter instance. |
void |
stop()
Stops a resource adapter instance. |
protected void |
stopInboundMessaging()
Stop the inbound messaging section of this adapter instance. |
boolean |
supportsSuspendInboundMessaging()
Indicate whether this ResourceAdapter can suspend its inbound messaging section. |
void |
suspendInboundMessaging()
Suspend the inbound messaging section for this ResourceAdapter instance. |
void |
validate()
Called by the client that is configuring an instance of this WLIResourceAdapter class after all the JavaBeans properties have been set. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected AbstractWLIResourceAdapter() throws javax.resource.ResourceException
javax.resource.ResourceException
- - an exceptional condition was encountered
while attempting to initialize the resource adapter possibly
due to an invalid license, or missing class file.Method Detail |
public void setName(String name)
setName
in interface WLIResourceAdapter
public String getName()
getName
in interface WLIResourceAdapter
public void setGUID(String guid)
setGUID
in interface WLIResourceAdapter
public String getGUID()
getGUID
in interface WLIResourceAdapter
public String getAdapterName()
protected void setAdapterName(String name)
public String getAdapterDescription()
protected void setAdapterDescription(String desc)
public String getAdapterVendorName()
protected void setAdapterVendorName(String vendor)
public String getAdapterVersion()
protected void setAdapterVersion(String version)
public String getAdapterEisType()
protected void setAdapterEisType(String type)
public void setInboundMessagingInstanceIDs(String[] instanceIDs)
setInboundMessagingInstanceIDs
in interface WLIResourceAdapter
public String[] getInboundMessagingInstanceIDs()
getInboundMessagingInstanceIDs
in interface WLIResourceAdapter
public void validate() throws javax.resource.ResourceException
validate
in interface WLIResourceAdapter
javax.resource.ResourceException
public boolean isValidState()
protected void internalValidate() throws javax.resource.ResourceException
javax.resource.ResourceException
public void start(BootstrapContext bc) throws javax.resource.spi.ResourceAdapterInternalException
start
in interface ResourceAdapter
javax.resource.spi.ResourceAdapterInternalException
- - an exceptional condition was
encountered while attempting to start the resource adapter
instance;protected void startInboundMessaging() throws javax.resource.spi.ResourceAdapterInternalException
javax.resource.spi.ResourceAdapterInternalException
protected void stopInboundMessaging() throws javax.resource.spi.ResourceAdapterInternalException
javax.resource.spi.ResourceAdapterInternalException
public void stop() throws javax.resource.ResourceException
stop
in interface ResourceAdapter
javax.resource.ResourceException
public void endpointActivation(MessageEndpointFactory mef, ActivationSpec as) throws javax.resource.NotSupportedException
endpointActivation
in interface ResourceAdapter
javax.resource.NotSupportedException
public void endpointDeactivation(MessageEndpointFactory mef, ActivationSpec as)
endpointDeactivation
in interface ResourceAdapter
public XAResource[] getXAResources(ActivationSpec[] specs) throws javax.resource.ResourceException
getXAResources
in interface ResourceAdapter
javax.resource.ResourceException
public javax.resource.cci.ConnectionFactory getConnectionFactory(String name)
getConnectionFactory
in interface WLIResourceAdapter
public void addConnectionFactory(String name, javax.resource.cci.ConnectionFactory factory)
addConnectionFactory
in interface WLIResourceAdapter
public javax.resource.cci.ConnectionFactory removeConnectionFactory(String name)
removeConnectionFactory
in interface WLIResourceAdapter
public Iterator listConnectionFactoryNames()
listConnectionFactoryNames
in interface WLIResourceAdapter
public boolean isInboundMessagingEnabled()
isInboundMessagingEnabled
in interface WLIResourceAdapter
public void setInboundMessagingEnabled(boolean newValue)
setInboundMessagingEnabled
in interface WLIResourceAdapter
public void refreshInboundMessaging() throws javax.resource.ResourceException
refreshInboundMessaging
in interface WLIResourceAdapter
javax.resource.ResourceException
public boolean supportsSuspendInboundMessaging()
supportsSuspendInboundMessaging
in interface WLIResourceAdapter
public void suspendInboundMessaging() throws javax.resource.NotSupportedException, javax.resource.ResourceException
suspendInboundMessaging
in interface WLIResourceAdapter
javax.resource.NotSupportedException
javax.resource.ResourceException
public void resumeInboundMessaging() throws javax.resource.NotSupportedException, javax.resource.ResourceException
resumeInboundMessaging
in interface WLIResourceAdapter
javax.resource.NotSupportedException
javax.resource.ResourceException
public Status getInboundMessagingStatus()
getInboundMessagingStatus
in interface WLIResourceAdapter
public Status getConnectionFactoryStatus(String name)
getConnectionFactoryStatus
in interface WLIResourceAdapter
public void addAdapterStatusListener(AdapterStatusListener listener)
addAdapterStatusListener
in interface WLIResourceAdapter
public void removeAdapterStatusListener(AdapterStatusListener listener)
removeAdapterStatusListener
in interface WLIResourceAdapter
public void setInboundMessagingStatus(Status status)
protected void initializeLogResources() throws javax.resource.ResourceException
javax.resource.ResourceException
- if this method fails to initialize the logging
framework or message bundle for this instance.protected void logInfo()
protected void initAdapterMetaData(ResourceBundle resourceBundle)
resourceBundle
- - provides internationalized and localized versions
of adapter metadata.protected ILogger getLogger() throws IllegalStateException
IllegalStateException
- if the log context is nullprotected LogContext getLogContext() throws IllegalStateException
IllegalStateException
- if the log context is null, i.e.
this object has not been initialized correctly.public void setLogLevel(String strLogLevel) throws javax.resource.ResourceException
javax.resource.ResourceException
public String getLogLevel()
public void setRootLogContext(String strRootLogContext) throws javax.resource.ResourceException
strRootLogContext
- - the root context from which all log messages
generated will be associated. This helps identify log messages according
to resource adapter type. Typically, this is related to the adapter/EIS
type, etc.
javax.resource.ResourceException
- - an exceptional condition was encountered while
attempting to set the root log context; the argument cannot be null or
"".public String getRootLogContext()
protected void setResourceAdapterProperties() throws javax.resource.ResourceException
javax.resource.ResourceException
protected void setStandardResourceAdapterProperties() throws javax.resource.ResourceException
javax.resource.ResourceException
protected void checkAndPutProperty(String name, Object value)
public void setAdditionalLogContext(String strAdditionalLogContext) throws javax.resource.ResourceException
strAdditionalLogContext
- - a value that provides additional context
information for this instance.
javax.resource.ResourceException
- - an exceptional condition was encountered while
attempting to set the additional context; the argument cannot be null or
"".public String getAdditionalLogContext()
public String getLogConfigFile()
public void setLogConfigFile(String logConfigFile)
public String getMessageBundleBase()
public void setMessageBundleBase(String messageBundleBase)
public String getLanguageCode()
public void setLanguageCode(String languageCode)
public String getCountryCode()
public void setCountryCode(String countryCode)
public void setEventGeneratorClassName(String eventGeneratorClassName) throws javax.resource.ResourceException
javax.resource.ResourceException
public String getEventGeneratorClassName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |