public interface ResourceAdaptorContext
ResourceAdaptorContext interface provides a resource adaptor object
with access to SLEE Facilities and other capabilities and objects implemented by the
SLEE on behalf of a Resource Adaptor.
A ResourceAdaptorContext object is given to a resource adaptor object after it
is created via the setResourceAdaptorContext
method. The ResourceAdaptorContext object remains associated with the resource
adaptor object for the lifetime of that resource adaptor object.
| Modifier and Type | Method and Description |
|---|---|
AlarmFacility |
getAlarmFacility()
Get the alarm facility used to raise, update, and clear alarms in the SLEE.
|
Object |
getDefaultUsageParameterSet()
Get the unnamed usage parameter set for the resource adaptor entity.
|
String |
getEntityName()
Get the name of the resource adaptor entity the resource adaptor object was
created for.
|
EventLookupFacility |
getEventLookupFacility()
Get the event lookup facility used to obtain the
FireableEventType objects
required for the resource adaptor to fire events to the SLEE. |
ServiceID |
getInvokingService()
Get the service component identifier of the service currently being invoked by
the SLEE in the current thread.
|
ProfileTable |
getProfileTable(String profileTableName)
Get a
ProfileTable object for a profile table. |
ResourceAdaptorID |
getResourceAdaptor()
Get the component identifier for this resource adaptor.
|
ResourceAdaptorTypeID[] |
getResourceAdaptorTypes()
Get the component identifiers of the resource adaptor types implemented
by this resource adaptor.
|
ServiceLookupFacility |
getServiceLookupFacility()
Get the service lookup facility used obtain information about the event types
that may be received by SBBs in a service.
|
SleeEndpoint |
getSleeEndpoint()
Get the SLEE Endpoint object used to notify the SLEE about activities that are
starting and ending, and to fire events on those activities to the SLEE.
|
SleeTransactionManager |
getSleeTransactionManager()
Get the SLEE transaction manager that allows a resource adaptor to demarcate
transaction boundaries.
|
Timer |
getTimer()
Get the shared Java timer that can be used to schedule timer tasks.
|
Tracer |
getTracer(String tracerName)
Get a tracer for the specified tracer name.
|
Object |
getUsageParameterSet(String paramSetName)
Get a named usage parameter set for the resource adaptor entity.
|
ResourceAdaptorID getResourceAdaptor()
This method is a non-transactional method.
ResourceAdaptorTypeID[] getResourceAdaptorTypes()
This method is a non-transactional method.
String getEntityName()
This method is a non-transactional method.
SleeEndpoint getSleeEndpoint()
This method is a non-transactional method.
AlarmFacility getAlarmFacility()
ResourceAdaptorEntityNotification that contains the
name of the resource adaptor entity as identified by getEntityName().
Alarm notifications generated by this alarm facility are of the type
ResourceAdaptorEntityNotification.ALARM_NOTIFICATION_TYPE.
This method is a non-transactional method.
Tracer getTracer(String tracerName) throws NullPointerException, IllegalArgumentException, SLEEException
ResourceAdaptorEntityNotification that contains the
name of the resource adaptor entity as identified by getEntityName().
Refer Tracer for a complete discussion on tracers and
tracer names.
Trace notifications generated by a tracer obtained using this method are of the type
ResourceAdaptorEntityNotification.TRACE_NOTIFICATION_TYPE.
This method is a non-transactional method.
tracerName - the name of the tracer.ResourceAdaptorEntityNotification
object containing a resource adaptor entity name equal to that obtained from the
getEntityName() method on this ResourceAdaptorContext.NullPointerException - if tracerName is null.IllegalArgumentException - if tracerName is an invalid name. Name
components within a tracer name must have at least one character. For example,
"com.mycompany" is a valid tracer name, whereas "com..mycompany"
is not.SLEEException - if the tracer could not be obtained due to a system-level failure.EventLookupFacility getEventLookupFacility()
FireableEventType objects
required for the resource adaptor to fire events to the SLEE.
This method is a non-transactional method.
ServiceLookupFacility getServiceLookupFacility()
This method is a non-transactional method.
SleeTransactionManager getSleeTransactionManager()
This method is a non-transactional method.
Timer getTimer()
A Resource Adaptor is not permitted to use the Timer.cancel() method on
the Timer object returned from this method. Attempting to do so
will cause a java.lang.UnsupportedOperationException to be thrown.
This method is a non-transactional method.
ProfileTable getProfileTable(String profileTableName) throws NullPointerException, UnrecognizedProfileTableNameException, SLEEException
ProfileTable object for a profile table. The object returned
by this method may be safely typecast to the Profile Table interface defined by
the profile specification of the profile table if the resource adaptor has the
appropriate classes in its classloader to do so, for example by declaring a
profile-spec-ref in its deployment descriptor for the profile
specification of the Profile Table.
This method is a non-transactional method.
profileTableName - the name of the profile table.ProfileTable object for the profile table.NullPointerException - if profileTableName is null.UnrecognizedProfileTableNameException - if a profile table with the
specified name does not exist.SLEEException - if the ProfileTable object could not be
obtained due to a system-level-failure.Object getDefaultUsageParameterSet() throws NoUsageParametersInterfaceDefinedException, SLEEException
This method can only be invoked by resource adaptor entities of a Resource Adaptor
that defines a Usage Parameters Interface. If a resource adaptor entity of a
Resource Adaptor that doesn't define a Usage Parameters Interface attempts to invoke
this method, a NoUsageParametersInterfaceDefinedException is thrown.
This method is a non-transactional method.
NoUsageParametersInterfaceDefinedException - if the Resource Adaptor did not
define a Usage Parameters Interface.SLEEException - if the usage parameter set could not be obtained due to a
system-level failure.Object getUsageParameterSet(String paramSetName) throws NullPointerException, NoUsageParametersInterfaceDefinedException, UnrecognizedUsageParameterSetNameException, SLEEException
This method can only be invoked by resource adaptor entities of a Resource Adaptor
that defines a Usage Parameters Interface. If a resource adaptor entity of a
Resource Adaptor that doesn't define a Usage Parameters Interface attempts to invoke
this method, a NoUsageParametersInterfaceDefinedException is thrown.
This method is a non-transactional method.
paramSetName - the name of the usage parameter set to return.NullPointerException - if paramSetName is null.NoUsageParametersInterfaceDefinedException - if the Resource Adaptor did not
define a Usage Parameters Interface.UnrecognizedUsageParameterSetNameException - if the name does not identify a
usage parameter set that has been created for the resource adaptor entity.SLEEException - if the usage parameter set could not be obtained due to a
system-level failure.ServiceID getInvokingService()
null if there is no such
service.