org.oasisopen.sca
Interface RequestContext


public interface RequestContext

The RequestContext interface is used to obtain information about the service invocation which is executing when one of the RequestContext methods is called.


Method Summary
<CB> CB
getCallback()
          Returns a proxy for the callback for the invoked service as specified by the service client.
<CB> ServiceReference<CB>
getCallbackReference()
          Returns a service reference for the callback for the invoked service operation, as specified by the service caller.
 javax.security.auth.Subject getSecuritySubject()
          Returns the JAAS Subject of the current request.
 java.lang.String getServiceName()
          Returns the name of the service under which the current service method is executing.
<B> ServiceReference<B>
getServiceReference()
          Returns a ServiceReference object for the service that is executing.
 

Method Detail

getSecuritySubject

javax.security.auth.Subject getSecuritySubject()
Returns the JAAS Subject of the current request.

Returns:
The JAAS (javax.security.auth.Subject) Subject of the current request. Returns null if there is no JAAS Subject.

getServiceName

java.lang.String getServiceName()
Returns the name of the service under which the current service method is executing.

Returns:
the name of the service under which the current service operation is executing, or null if called outside of the execution of a service method.

getCallbackReference

<CB> ServiceReference<CB> getCallbackReference()
Returns a service reference for the callback for the invoked service operation, as specified by the service caller.

Type Parameters:
CB - the Java interface type of the callback.
Returns:
a service reference for the callback as specified by the service caller. Returns null when called for a service request whose interface is not bidirectional, or when called during execution of a callback request, or when called outside the execution of a service method.

getCallback

<CB> CB getCallback()
Returns a proxy for the callback for the invoked service as specified by the service client.

Type Parameters:
CB - the type of the callback proxy
Returns:
a proxy for the callback for the invoked service as specified by the service client. Returns null when called during the execution of a service method whose interface is not bidirectional, or when called during the execution of a callback request, or when called outside the execution of a service method.

getServiceReference

<B> ServiceReference<B> getServiceReference()
Returns a ServiceReference object for the service that is executing.

Type Parameters:
B - the Java interface type associated with the service reference.
Returns:
the ServiceReference representing the service or callback that is executing. Returns null if when called outside the execution of a service method.