|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectscs.core.ComponentContext
public class ComponentContext
This class is the local representation of a SCS component. Its concept doesn't exist in the CORBA environment. As such, an instance of this class is considered a local instance of a component and gathers all of its facets, receptacles and meta-data. It also holds references to the ORB and POA used to create and activate its facets. Specifically in Java, this class is also responsible for generating connection id's for receptacles.
| Field Summary | |
|---|---|
int |
CONNECTION_LIMIT
Limit of concurrent connections, per component. |
static String |
ICOMPONENT_FACET_NAME
Name used for the IComponent facet. |
static String |
IMETAINTERFACE_FACET_NAME
Name used for the IMetaInterface facet. |
static String |
IRECEPTACLES_FACET_NAME
Name used for the IReceptacles facet. |
| Constructor Summary | |
|---|---|
ComponentContext(ORB orb,
POA poa,
ComponentId id)
Primary constructor. |
|
| Method Summary | |
|---|---|
void |
addFacet(String name,
String interfaceName,
Servant servant)
Adds a new facet to the component instance. |
void |
addReceptacle(String name,
String interfaceName,
boolean isMultiplex)
Adds a new receptacle to the component instance. |
ComponentId |
getComponentId()
Provides the ComponentId of this component instance. |
String |
getComponentIdAsString()
Returns a stringified version of the component's id, concatenating its name with the version number and its platform spec. |
Facet |
getFacetByName(String name)
Provides metadata about a specific facet. |
Collection<Facet> |
getFacets()
Provides metadata about the component's facets. |
IComponent |
getIComponent()
Provides a direct reference to the IComponent facet. |
ORB |
getORB()
Returns the ORB. |
POA |
getPOA()
Returns the POA. |
Receptacle |
getReceptacleByName(String name)
Provides metadata about a specific receptacle. |
Collection<Receptacle> |
getReceptacles()
Provides metadata about the component's receptacles. |
void |
removeFacet(String name)
Removes a facet from the component. |
void |
removeReceptacle(String name)
Removes a receptacle from the component. |
void |
updateFacet(String name,
Servant servant)
Changes the servant of a facet. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ICOMPONENT_FACET_NAME
public static final String IRECEPTACLES_FACET_NAME
public static final String IMETAINTERFACE_FACET_NAME
public final int CONNECTION_LIMIT
| Constructor Detail |
|---|
public ComponentContext(ORB orb,
POA poa,
ComponentId id)
throws SCSException
orb - The ORB to be used when creating this component instance's
facets.poa - The POA to register this component instance's facets.id - The type of this component.
SCSException - If any error occurs. The exception shall contain
another, more specific exception.| Method Detail |
|---|
public ComponentId getComponentId()
public void addFacet(String name,
String interfaceName,
Servant servant)
throws SCSException
name - The facet's name. This acts as the facet identifier within the
component.interfaceName - The facet's IDL interface.servant - The facet implementation, not yet activated within the POA.
SCSException - If an UserException is catched.
public void updateFacet(String name,
Servant servant)
throws SCSException
name - The existent facet's name.servant - The new servant, not yet activated within the POA.
SCSException - If an UserException is catched.
public void addReceptacle(String name,
String interfaceName,
boolean isMultiplex)
throws ReceptacleAlreadyExistsException
name - The receptacle's name. This acts as the receptacle identifier
within the component.interfaceName - The receptacle's IDL interface.isMultiplex - True if the receptacle accepts more than one connection,
false otherwise.
ReceptacleAlreadyExistsException
public void removeFacet(String name)
throws SCSException
name - The name of the facet to be removed.
SCSException - If an UserException is catched.
public void removeReceptacle(String name)
throws ReceptacleDoesNotExistException
name - The name of the receptacle to be removed.
ReceptacleDoesNotExistExceptionpublic Collection<Facet> getFacets()
public Facet getFacetByName(String name)
name - The name of the facet.
public Collection<Receptacle> getReceptacles()
public Receptacle getReceptacleByName(String name)
name - The name of the receptacle.
public IComponent getIComponent()
public String getComponentIdAsString()
public POA getPOA()
public ORB getORB()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||