org.apache.tuscany.sca.core.context
Class ServiceReferenceImpl<B>

java.lang.Object
  extended by org.apache.tuscany.sca.core.context.CallableReferenceImpl<B>
      extended by org.apache.tuscany.sca.core.context.ServiceReferenceImpl<B>
Type Parameters:
B - the type of the business interface
All Implemented Interfaces:
java.io.Externalizable, java.io.Serializable, org.osoa.sca.CallableReference<B>, org.osoa.sca.ServiceReference<B>

public class ServiceReferenceImpl<B>
extends CallableReferenceImpl<B>
implements org.osoa.sca.ServiceReference<B>

Default implementation of a ServiceReference.

See Also:
Serialized Form

Field Summary
protected  java.lang.Object callback
           
 
Fields inherited from class org.apache.tuscany.sca.core.context.CallableReferenceImpl
binding, businessInterface, callbackID, component, compositeActivator, conversation, conversationID, conversationManager, proxy, proxyFactory, reference, scdl
 
Constructor Summary
ServiceReferenceImpl()
           
ServiceReferenceImpl(java.lang.Class<B> businessInterface, RuntimeComponent component, RuntimeComponentReference reference, Binding binding, ProxyFactory proxyFactory, CompositeActivator compositeActivator)
           
ServiceReferenceImpl(java.lang.Class<B> businessInterface, RuntimeComponent component, RuntimeComponentReference reference, ProxyFactory proxyFactory, CompositeActivator compositeActivator)
           
ServiceReferenceImpl(java.lang.Class<B> businessInterface, RuntimeWire wire, ProxyFactory proxyFactory)
           
ServiceReferenceImpl(javax.xml.stream.XMLStreamReader xmlReader)
           
 
Method Summary
 java.lang.Object getCallback()
          Returns the callback object.
 java.lang.Object getConversationID()
          Returns the id supplied by the user that will be associated with conversations initiated through this reference.
protected  ReferenceParameters getReferenceParameters()
           
 void setCallback(java.lang.Object callback)
          Sets the callback object.
 void setCallbackID(java.lang.Object callbackID)
          Sets the callback ID.
 void setConversationID(java.lang.Object conversationID)
          Set the id to associate with any conversation started through this reference.
 
Methods inherited from class org.apache.tuscany.sca.core.context.CallableReferenceImpl
attachCallbackID, attachConversation, attachConversation, attachConversationID, bind, createProxy, getBusinessInterface, getCallbackID, getConversation, getEndpointReference, getProxy, getRuntimeWire, getService, getXMLReader, initCallbackID, isConversational, readExternal, resolveComponentURI, resolveServiceURI, setProxy, toXMLString, writeExternal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.osoa.sca.CallableReference
getBusinessInterface, getCallbackID, getConversation, getService, isConversational
 

Field Detail

callback

protected transient java.lang.Object callback
Constructor Detail

ServiceReferenceImpl

public ServiceReferenceImpl()

ServiceReferenceImpl

public ServiceReferenceImpl(javax.xml.stream.XMLStreamReader xmlReader)
                     throws java.lang.Exception
Throws:
java.lang.Exception

ServiceReferenceImpl

public ServiceReferenceImpl(java.lang.Class<B> businessInterface,
                            RuntimeWire wire,
                            ProxyFactory proxyFactory)
Parameters:
businessInterface -
wire -
proxyFactory -

ServiceReferenceImpl

public ServiceReferenceImpl(java.lang.Class<B> businessInterface,
                            RuntimeComponent component,
                            RuntimeComponentReference reference,
                            ProxyFactory proxyFactory,
                            CompositeActivator compositeActivator)

ServiceReferenceImpl

public ServiceReferenceImpl(java.lang.Class<B> businessInterface,
                            RuntimeComponent component,
                            RuntimeComponentReference reference,
                            Binding binding,
                            ProxyFactory proxyFactory,
                            CompositeActivator compositeActivator)
Method Detail

getConversationID

public java.lang.Object getConversationID()
Description copied from interface: org.osoa.sca.ServiceReference
Returns the id supplied by the user that will be associated with conversations initiated through this reference.

Specified by:
getConversationID in interface org.osoa.sca.ServiceReference<B>
Returns:
the id to associated with any conversation initiated through this reference

setConversationID

public void setConversationID(java.lang.Object conversationID)
                       throws java.lang.IllegalStateException
Description copied from interface: org.osoa.sca.ServiceReference
Set the id to associate with any conversation started through this reference. If the value supplied is null then the id will be generated by the implementation.

Specified by:
setConversationID in interface org.osoa.sca.ServiceReference<B>
Parameters:
conversationID - the user-defined id to associated with a conversation
Throws:
java.lang.IllegalStateException - if a conversation is currently associated with this reference

setCallbackID

public void setCallbackID(java.lang.Object callbackID)
Description copied from interface: org.osoa.sca.ServiceReference
Sets the callback ID.

Specified by:
setCallbackID in interface org.osoa.sca.ServiceReference<B>
Parameters:
callbackID - the callback ID

getCallback

public java.lang.Object getCallback()
Description copied from interface: org.osoa.sca.ServiceReference
Returns the callback object.

Specified by:
getCallback in interface org.osoa.sca.ServiceReference<B>
Returns:
the callback object

setCallback

public void setCallback(java.lang.Object callback)
Description copied from interface: org.osoa.sca.ServiceReference
Sets the callback object.

Specified by:
setCallback in interface org.osoa.sca.ServiceReference<B>
Parameters:
callback - the callback object

getReferenceParameters

protected ReferenceParameters getReferenceParameters()
Overrides:
getReferenceParameters in class CallableReferenceImpl<B>