scs.core
Class IReceptaclesServant

java.lang.Object
  extended by org.omg.PortableServer.Servant
      extended by scs.core.IReceptaclesPOA
          extended by scs.core.IReceptaclesServant
All Implemented Interfaces:
InvokeHandler, IReceptaclesOperations

public class IReceptaclesServant
extends IReceptaclesPOA

This class is the basic implementation of the IDL interface IReceptacles. The IReceptacles interface provides access to and manipulation of the component's receptacles.


Constructor Summary
IReceptaclesServant(ComponentContext myComponent)
          Primary constructor.
 
Method Summary
 Object _get_component()
          Provides the reference to the most basic facet of the component, IComponent.
 int connect(String receptacle, Object obj)
          Connects a remote facet to a receptacle.
 void disconnect(int id)
          Disconnects a remote facet from a receptacle.
 ConnectionDescription[] getConnections(String receptacle)
          Provides metadata about all connections of a specified receptacle.
 
Methods inherited from class scs.core.IReceptaclesPOA
_all_interfaces, _invoke, _this, _this
 
Methods inherited from class org.omg.PortableServer.Servant
_default_POA, _get_delegate, _get_interface_def, _is_a, _non_existent, _object_id, _orb, _poa, _set_delegate, _this_object, _this_object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IReceptaclesServant

public IReceptaclesServant(ComponentContext myComponent)
Primary constructor.

Parameters:
myComponent - The component that owns this facet instance.
Method Detail

connect

public int connect(String receptacle,
                   Object obj)
            throws InvalidName,
                   InvalidConnection,
                   AlreadyConnected,
                   ExceededConnectionLimit
Connects a remote facet to a receptacle. The facet must implement the interface specified by the receptacle.

Parameters:
receptacle - The receptacle name.
obj - The remote facet reference.
Returns:
The connection identifier. It's valid for the entire component, not for a specific receptacle.
Throws:
InvalidName - If there's no receptacle with the specified name.
InvalidConnection - If the facet object does not implement the receptacle's specified interface.
AlreadyConnected - If the receptacle supports only one connection and is already connected.
ExceededConnectionLimit - If the receptacle is multiplex and the maximum number of connections was already reached.
See Also:
IReceptaclesOperations.connect(String, org.omg.CORBA.Object)

disconnect

public void disconnect(int id)
                throws InvalidConnection,
                       NoConnection
Disconnects a remote facet from a receptacle. There's no need to specify the receptacle.

Parameters:
id - The connection identifier.
Throws:
InvalidConnection - If the connection identifier is invalid, i.e., less than or equal to zero.
NoConnection - If the provided connection identifier does not exist.

getConnections

public ConnectionDescription[] getConnections(String receptacle)
                                       throws InvalidName
Provides metadata about all connections of a specified receptacle.

Parameters:
receptacle - The receptacle name.
Returns:
An array with the connections metadata.
Throws:
InvalidName - If the specified receptacle does not exist.
See Also:
IReceptaclesOperations.getConnections(String)

_get_component

public Object _get_component()
Provides the reference to the most basic facet of the component, IComponent.



Copyright © 2014. All Rights Reserved.