org.osoa.sca
Interface CompositeContext


public interface CompositeContext

Interface used by SCA Components to access their context

Version:
$Rev: 431035 $ $Date: 2006-08-12 06:54:25 -0700 (Sat, 12 Aug 2006) $

Method Summary
 ServiceReference createServiceReferenceForSession(java.lang.Object self)
          Create a reference to the supplied component.
 ServiceReference createServiceReferenceForSession(java.lang.Object self, java.lang.String serviceName)
          Create a reference to the named service implemented by the supplied component.
 java.lang.String getCompositeName()
          Returns the name of the parent composite.
 java.lang.String getCompositeURI()
          Returns the absolute URI of the composite component.
 RequestContext getRequestContext()
          Returns the request context that corresponds to the last remotable service invocation.
<T> T
locateService(java.lang.Class<T> serviceType, java.lang.String serviceName)
          Returns an object implementing the interface defined for the named service.
 ServiceReference newSession(java.lang.String serviceName)
          Create a new session for stateful interaction with the named service.
 ServiceReference newSession(java.lang.String serviceName, java.lang.Object sessionId)
          Create a new session for stateful interaction with the named service using an application-supplied session identifier.
 

Method Detail

getCompositeName

java.lang.String getCompositeName()
Returns the name of the parent composite.

Returns:
the name of the module

getCompositeURI

java.lang.String getCompositeURI()
Returns the absolute URI of the composite component.

Returns:
the absolute URI of the module component

getRequestContext

RequestContext getRequestContext()
Returns the request context that corresponds to the last remotable service invocation. If this is invoked from outside an SCA component then null is returned.

Returns:
the current request context

locateService

<T> T locateService(java.lang.Class<T> serviceType,
                    java.lang.String serviceName)
Returns an object implementing the interface defined for the named service.

Parameters:
serviceName - the name of another service in the current module
Returns:
an object that implements the service's interface

createServiceReferenceForSession

ServiceReference createServiceReferenceForSession(java.lang.Object self)
Create a reference to the supplied component. The component must define only one service.

Parameters:
self - the component to be referenced
Returns:
a reference to the component

createServiceReferenceForSession

ServiceReference createServiceReferenceForSession(java.lang.Object self,
                                                  java.lang.String serviceName)
Create a reference to the named service implemented by the supplied component.

Parameters:
self - the component to be referenced
serviceName - the service to be referenced
Returns:
a reference to the service

newSession

ServiceReference newSession(java.lang.String serviceName)
Create a new session for stateful interaction with the named service.

Parameters:
serviceName - the name of the service to interact with
Returns:
a reference to the service

newSession

ServiceReference newSession(java.lang.String serviceName,
                            java.lang.Object sessionId)
Create a new session for stateful interaction with the named service using an application-supplied session identifier.

Parameters:
serviceName - the name of the service to interact with
sessionId - a token that identifies this session
Returns:
a reference to the service


Copyright © 2006 Apache Software Foundation. All Rights Reserved.