org.apache.tuscany.sca.host.embedded
Class SCADomainBean

java.lang.Object
  extended by org.apache.tuscany.sca.host.embedded.SCADomain
      extended by org.apache.tuscany.sca.host.embedded.SCADomainBean

public class SCADomainBean
extends SCADomain


Field Summary
 
Fields inherited from class org.apache.tuscany.sca.host.embedded.SCADomain
theDomain
 
Constructor Summary
SCADomainBean()
          Constructs a new SCA domain
 
Method Summary
<B,R extends org.osoa.sca.CallableReference<B>>
R
cast(B target)
          Cast a type-safe reference to a CallableReference.
 void close()
          Close the SCA domain.
protected  void finalize()
           
 ComponentManager getComponentManager()
           
 java.lang.String getContributionLocation()
           
 java.lang.String[] getDeployableComposites()
           
<B> B
getService(java.lang.Class<B> businessInterface, java.lang.String serviceName)
          Returns a proxy for a service provided by a component in the SCA domain.
<B> org.osoa.sca.ServiceReference<B>
getServiceReference(java.lang.Class<B> businessInterface, java.lang.String referenceName)
          Returns a ServiceReference for a service provided by a component in the SCA domain.
 java.lang.String getURI()
          Returns the URI of the SCA Domain.
 void setContributionLocation(java.lang.String contributionLocation)
           
 void setDeployableComposite(java.lang.String composite)
           
 void setDeployableComposites(java.lang.String... composites)
           
 void setURI(java.lang.String uri)
           
 
Methods inherited from class org.apache.tuscany.sca.host.embedded.SCADomain
connect, newInstance, newInstance, newInstance, removeInstance
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCADomainBean

public SCADomainBean()
Constructs a new SCA domain

Method Detail

getURI

public java.lang.String getURI()
Description copied from class: SCADomain
Returns the URI of the SCA Domain.

Specified by:
getURI in class SCADomain
Returns:
the URI of the SCA Domain

setURI

public void setURI(java.lang.String uri)

setContributionLocation

public void setContributionLocation(java.lang.String contributionLocation)

getContributionLocation

public java.lang.String getContributionLocation()

setDeployableComposite

public void setDeployableComposite(java.lang.String composite)

setDeployableComposites

public void setDeployableComposites(java.lang.String... composites)

getDeployableComposites

public java.lang.String[] getDeployableComposites()

cast

public <B,R extends org.osoa.sca.CallableReference<B>> R cast(B target)
                                                 throws java.lang.IllegalArgumentException
Description copied from class: SCADomain
Cast a type-safe reference to a CallableReference. Converts a type-safe reference to an equivalent CallableReference; if the target refers to a service then a ServiceReference will be returned, if the target refers to a callback then a CallableReference will be returned.

Specified by:
cast in class SCADomain
Type Parameters:
B - the Java type of the business interface for the reference
R - the type of reference to be returned
Parameters:
target - a reference proxy provided by the SCA runtime
Returns:
a CallableReference equivalent for the proxy
Throws:
java.lang.IllegalArgumentException - if the supplied instance is not a reference supplied by the SCA runtime

close

public void close()
Description copied from class: SCADomain
Close the SCA domain.

Overrides:
close in class SCADomain

getService

public <B> B getService(java.lang.Class<B> businessInterface,
                        java.lang.String serviceName)
Description copied from class: SCADomain
Returns a proxy for a service provided by a component in the SCA domain.

Specified by:
getService in class SCADomain
Type Parameters:
B - the Java type of the business interface for the service
Parameters:
businessInterface - the interface that will be used to invoke the service
serviceName - the name of the service
Returns:
an object that implements the business interface

getServiceReference

public <B> org.osoa.sca.ServiceReference<B> getServiceReference(java.lang.Class<B> businessInterface,
                                                                java.lang.String referenceName)
Description copied from class: SCADomain
Returns a ServiceReference for a service provided by a component in the SCA domain.

Specified by:
getServiceReference in class SCADomain
Type Parameters:
B - the Java type of the business interface for the service
Parameters:
businessInterface - the interface that will be used to invoke the service
referenceName - the name of the service
Returns:
a ServiceReference for the designated service

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

getComponentManager

public ComponentManager getComponentManager()
Overrides:
getComponentManager in class SCADomain