diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-02 13:01:07 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2010-11-02 13:01:07 +0000 |
commit | 54dcf777e655a94049d8000f8f7b15846f1d54e6 (patch) | |
tree | a2cc990cf48e1377396b975fff9855ecfd18f1e0 /sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java | |
parent | cab9e5e0c2ee4bd15ba65625fd9ff75ced777c75 (diff) |
Tag for 2.0-Beta1-RC2
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1030026 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java')
-rw-r--r-- | sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java b/sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java new file mode 100644 index 0000000000..162e8e2055 --- /dev/null +++ b/sca-java-2.x/tags/2.0-Beta1-RC2/modules/sca-api/src/main/java/org/oasisopen/sca/RequestContext.java @@ -0,0 +1,71 @@ +/* + * Copyright(C) OASIS(R) 2005,2010. All Rights Reserved. + * OASIS trademark, IPR and other policies apply. + */ +package org.oasisopen.sca; + +import javax.security.auth.Subject; + +/** + * The RequestContext interface is used to obtain information about + * the service invocation which is executing when one of the + * RequestContext methods is called. + */ +public interface RequestContext { + + /** + * Returns the JAAS Subject of the current request. + * + * @return The JAAS (javax.security.auth.Subject) Subject of the + * current request. Returns null if there is no JAAS + * Subject. + */ + Subject getSecuritySubject(); + + /** + * Returns the name of the service under which the current service + * method is executing. + * + * @return 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. + */ + String getServiceName(); + + /** + * Returns a service reference for the callback for the invoked service + * operation, as specified by the service caller. + * + * @param <CB> the Java interface type of the callback. + * @return 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. + */ + <CB> ServiceReference<CB> getCallbackReference(); + + /** + * Returns a proxy for the callback for the invoked service as specified + * by the service client. + * + * @param <CB> the type of the callback proxy + * @return 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. + */ + <CB> CB getCallback(); + + /** + * Returns a ServiceReference object for the service that is executing. + * + * @param <B> the Java interface type associated with the service reference. + * @return the ServiceReference representing the service or callback + * that is executing. Returns null if when called outside the + * execution of a service method. + */ + <B> ServiceReference<B> getServiceReference(); +} |