[asterisk-scf-commits] asterisk-scf/release/slice.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Fri May 6 10:27:46 CDT 2011


branch "master" has been updated
       via  1443edddb16e1ac462e51a1accbac8f225117356 (commit)
      from  db0812c0c896d51c136cb89fa3f7a14ba22ebf31 (commit)

Summary of changes:
 AsteriskSCF/Core/Routing/RoutingIf.ice             |  119 ++--
 .../SessionCommunicationsIf.ice                    |  846 ++++++++++----------
 .../System/Component/ComponentServiceIf.ice        |   94 ++-
 3 files changed, 552 insertions(+), 507 deletions(-)


- Log -----------------------------------------------------------------
commit 1443edddb16e1ac462e51a1accbac8f225117356
Author: Ken Hunt <ken.hunt at digium.com>
Date:   Mon Dec 20 21:01:23 2010 -0600

    - Changes for asynchronous routing support.
    - Changes to support replication in routing service.
    - Component test interface.

diff --git a/AsteriskSCF/Core/Routing/RoutingIf.ice b/AsteriskSCF/Core/Routing/RoutingIf.ice
index 4dc6993..85ab304 100644
--- a/AsteriskSCF/Core/Routing/RoutingIf.ice
+++ b/AsteriskSCF/Core/Routing/RoutingIf.ice
@@ -18,8 +18,8 @@
 
 #include <AsteriskSCF/Core/Endpoint/EndpointIf.ice>
 
-module AsteriskSCF
-{
+module AsteriskSCF 
+{ 
 
 module Core
 {
@@ -92,8 +92,9 @@ module V1
        *
        * @throws InvalidParamsException if the destination contains invalid information.
        */
+      ["amd"]
       idempotent Endpoint::V1::EndpointSeq lookup(string destination)
-	 throws DestinationNotFoundException, InvalidParamsException;
+            throws DestinationNotFoundException, InvalidParamsException;
    };
 
 
@@ -129,7 +130,7 @@ module V1
        * @throws InvalidParamsException if any parameters are invalid.
        */
       void addEndpointLocator(string id, RegExSeq destinationIdRangeList, EndpointLocator *locator)
-	 throws LocatorAlreadyRegisteredException, InvalidParamsException;
+     throws LocatorAlreadyRegisteredException, InvalidParamsException;
 
       /**
        * Method which unregisters an EndpointLocator.
@@ -153,7 +154,7 @@ module V1
        * @throws InvalidParamsException if any parameters are invalid.
        */
       void setEndpointLocatorDestinationIds(string id, RegExSeq deviceIdRangeList)
-	 throws DestinationNotFoundException, InvalidParamsException;
+     throws DestinationNotFoundException, InvalidParamsException;
    };
 
 
@@ -183,8 +184,8 @@ module V1
        */
       enum OperationResult
       {
-	 SUCCESS,
-	 FAILURE
+          SUCCESS,
+          FAILURE
       };
 
       /**
@@ -197,58 +198,58 @@ module V1
        */
       interface RoutingEvents
       {
-	 /**
-	  * Notification that a lookup was attempted.
-	  *
-	  * @param destinationId The destination being looked up.
-	  *
-	  * @param result Indicates whether or not the attempt was successful.
-	  */
-	 void lookupEvent(string destinationId, OperationResult result);
-
-	 /**
-	  * Notification that an attempt to add an EndpointLocator was made.
-	  *
-	  * @param id The identifier of the EndpointLocator being added.
-	  *
-	  * @param destinationIdRangeList A set of regular expressions that define the endpoints available.
-	  *
-	  * @param result Indicates whether or not the attempt was successful.
-	  */
-	 void addEndpointLocatorEvent(string id, RegExSeq destinationIdRangeList, OperationResult result);
-
-	 /**
-	  * Notification that an attempt was made to remove an EndpointLocator.
-	  *
-	  * @param id The identifier of the EndpointLocator being removed.
-	  *
-	  * @param result Indicates whether or not the attempt was successful.
-	  */
-	 void removeEndpointLocatorEvent(string id, OperationResult result);
-
-	 /**
-	  * Notification that an attempt was made to modify the range of destinationIds
-	  * accessible from a given EndpointLocator.
-	  *
-	  * @param id The destination being looked up.
-	  *
-	  * @param destinationIdRangeList A list of regular expressions to be representative of the new valid ids.
-	  *
-	  * @param result Indicates whether or not the attempt was successful.
-	  */
-	 void setEndpointLocatorDestinationIdsEvent(string id, RegExSeq destinationIdRangeList, OperationResult result);
-
-	 /**
-	  * Called when the EndpointLocator cache has been cleared by an administrative action.
-	  */
-	 void clearEndpointLocatorsEvent();
-
-	 /**
-	  * Called when an administration operation has set the routing service policy.
-	  *
-	  * @param policy The new policy.
-	  */
-	 void setPolicyEvent(string policy);
+     /**
+      * Notification that a lookup was attempted.
+      *
+      * @param destinationId The destination being looked up.
+      *
+      * @param result Indicates whether or not the attempt was successful.
+      */
+     void lookupEvent(string destinationId, OperationResult result);
+
+     /**
+      * Notification that an attempt to add an EndpointLocator was made.
+      *
+      * @param id The identifier of the EndpointLocator being added.
+      *
+      * @param destinationIdRangeList A set of regular expressions that define the endpoints available.
+      *
+      * @param result Indicates whether or not the attempt was successful.
+      */
+     void addEndpointLocatorEvent(string id, RegExSeq destinationIdRangeList, EndpointLocator *locator, OperationResult result);
+
+     /**
+      * Notification that an attempt was made to remove an EndpointLocator.
+      *
+      * @param id The identifier of the EndpointLocator being removed.
+      *
+      * @param result Indicates whether or not the attempt was successful.
+      */
+     void removeEndpointLocatorEvent(string id, OperationResult result);
+
+     /**
+      * Notification that an attempt was made to modify the range of destinationIds
+      * accessible from a given EndpointLocator.
+      *
+      * @param id The destination being looked up.
+      *
+      * @param destinationIdRangeList A list of regular expressions to be representative of the new valid ids.
+      *
+      * @param result Indicates whether or not the attempt was successful.
+      */
+     void setEndpointLocatorDestinationIdsEvent(string id, RegExSeq destinationIdRangeList, OperationResult result);
+
+     /**
+      * Called when the EndpointLocator cache has been cleared by an administrative action.
+      */
+     void clearEndpointLocatorsEvent();
+
+     /**
+      * Called when an administration operation has set the routing service policy.
+      *
+      * @param policy The new policy.
+      */
+     void setPolicyEvent(string policy);
       };
    };
 
diff --git a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
index b8e4d4c..e2629dc 100644
--- a/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
+++ b/AsteriskSCF/SessionCommunications/SessionCommunicationsIf.ice
@@ -62,12 +62,12 @@ module V1
      */
     class ResponseCode
     {
-	/**
-	 * ISDN cause code @see http://tools.ietf.org/html/rfc3398
-	 *
-	 * Default value is normal clearing
-	 */
-	int isdnCode = 34;
+    /**
+     * ISDN cause code @see http://tools.ietf.org/html/rfc3398
+     *
+     * Default value is normal clearing
+     */
+    int isdnCode = 34;
     };
 
     /**
@@ -80,51 +80,51 @@ module V1
      */
     class SessionInfo
     {
-	/**
-	 * A proxy to the endpoint that initiated the current session.
-	 */
-	SessionEndpoint* caller;
+    /**
+     * A proxy to the endpoint that initiated the current session.
+     */
+    SessionEndpoint* caller;
 
-	/**
-	 * The duration of the 'connected' time for this session.
-	 */
-	long connectedTime = 0;
+    /**
+     * The duration of the 'connected' time for this session.
+     */
+    long connectedTime = 0;
 
-	/**
-	 * A textual description of the current state of the session. For
-	 * example: pending, connected, hanging up.
-	 */
-	string currentState;
+    /**
+     * A textual description of the current state of the session. For
+     * example: pending, connected, hanging up.
+     */
+    string currentState;
 
-	/**
-	 * A proxy to the endpoint handling the destination session.
-	 */
-	SessionEndpoint* destination;
+    /**
+     * A proxy to the endpoint handling the destination session.
+     */
+    SessionEndpoint* destination;
 
-	/**
-	 * A textual description of this Session's role in the
-	 * current communications.
-	 */
-	string role;
+    /**
+     * A textual description of this Session's role in the
+     * current communications.
+     */
+    string role;
 
-	/**
-	 * When the session was initiated.
-	 */
-	AsteriskSCF::System::Time::V1::TimeMarker startTime;
+    /**
+     * When the session was initiated.
+     */
+    AsteriskSCF::System::Time::V1::TimeMarker startTime;
     };
 
     /**
      * Indication visitor class.
      */
     ["visitor"] local class IndicationVisitor
-		{
+    {
     };
 
     /**
      * Basic indication class. Meant to be extended.
      */
     ["visitor:IndicationVisitor"] unsliceable class Indication
-				  {
+    {
     };
 
     /**
@@ -286,21 +286,21 @@ module V1
      */
     interface Session
     {
-	/**
-	 * Registers an instance of SessionListener with the current
-	 * session.
-	 *
-	 * @param listener an instance of a SessionListener object.
-	 *
-	 * @return a SessionInfo object containing the current state of the session.
-	 *       This allows "listeners" to be configured with a some initial state
-	 *       to give context to future notifications.
-	 *
-	 * @see SessionListener
-	 *
-	 * @see SessionInfo
-	 */
-	SessionInfo addListener(SessionListener* listener);
+        /**
+         * Registers an instance of SessionListener with the current
+         * session.
+         *
+         * @param listener an instance of a SessionListener object.
+         *
+         * @return a SessionInfo object containing the current state of the session.
+         *       This allows "listeners" to be configured with a some initial state
+         *       to give context to future notifications.
+         *
+         * @see SessionListener
+         *
+         * @see SessionInfo
+         */
+        SessionInfo addListener(SessionListener* listener);
 
         /**
          * Request that an indication be performed on a session.
@@ -315,83 +315,83 @@ module V1
          */
         void indicate(Indication event) throws IndicationException;
 
-	/**
-	 * Method which retrieves a proxy to the endpoint object that created the current session.
-	 *
-	 * @return The endpoint object that created the current session.
-	 *
-	 * @see SessionEndpoint
-	 */
-	SessionEndpoint* getEndpoint();
-
-	/**
-	 * Method which retrieves information about the current session's state.
-	 *
-	 * @return A SessionInfo instance with up to date information.
-	 *
-	 * @see SessionInfo
-	 */
-	SessionInfo getInfo();
-
-	/**
-	 * Retrieve a media session instance, if available, for the current session.
-	 * A media session object may not be available at the time this is called.
-	 * For example, in SIP before media details are known.
-	 *
-	 * @return An AsteriskSCF media session for the current session. May be a
-	 *   nil reference if the media part of the session has not been initialized.
-	 */
-	AsteriskSCF::Media::V1::Session* getMediaSession();
-
-	/**
-	 * Removes a listener from the current list. Once removed, a listener
-	 * no longer is notified of changes to the session.
-	 *
-	 * @param listener A proxy to the listener to the remove.
-	 */
-	void removeListener(SessionListener* listener);
-
-	/**
-	 * Start a session dialogue with a peer.
-	 */
-	void start();
-
-	/**
-	 * End the dialogue with the peer, sending the
-	 * provided response code if appropriate.
-	 *
-	 * @param response Code identifying the reason the dialog stopped.
-	 */
-	void stop(ResponseCode response);
-
-	/**
-	 * Gets the bridge object this Session is associated with.
-	 *
-	 * @return A proxy to the bridge the session is presently in.
-	 *
-	 * @throws NotBridged if the session is not currently in a bridge.
-	 */
-	Bridge* getBridge() throws NotBridged;
-
-	/**
-	 * Set the Bridge for this session.
-	 *
-	 * @param bridge A proxy to the Bridge object this Session should be associated with.
-	 *
-	 * @param listener A proxy to the Listener to add to the Session.
-	 *
-	 * @return A current copy of the session information.
-	 */
-	SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
-
-	/**
-	 * Removes this Session from it's associated Bridge.
-	 *
-	 * @param listener Removes the specified listener from the Session.
-	 *
-	 * @throws NotBridged if the session is not currently in a bridge.
-	 */
-	void removeBridge(SessionListener* listener) throws NotBridged;
+        /**
+         * Method which retrieves a proxy to the endpoint object that created the current session.
+         *
+         * @return The endpoint object that created the current session.
+         *
+         * @see SessionEndpoint
+         */
+        SessionEndpoint* getEndpoint();
+
+        /**
+         * Method which retrieves information about the current session's state.
+         *
+         * @return A SessionInfo instance with up to date information.
+         *
+         * @see SessionInfo
+         */
+        SessionInfo getInfo();
+
+        /**
+         * Retrieve a media session instance, if available, for the current session.
+         * A media session object may not be available at the time this is called.
+         * For example, in SIP before media details are known.
+         *
+         * @return An AsteriskSCF media session for the current session. May be a
+         *   nil reference if the media part of the session has not been initialized.
+         */
+        AsteriskSCF::Media::V1::Session* getMediaSession();
+
+        /**
+         * Removes a listener from the current list. Once removed, a listener
+         * no longer is notified of changes to the session.
+         *
+         * @param listener A proxy to the listener to the remove.
+         */
+        void removeListener(SessionListener* listener);
+
+        /**
+         * Start a session dialogue with a peer.
+         */
+        void start();
+
+        /**
+         * End the dialogue with the peer, sending the
+         * provided response code if appropriate.
+         *
+         * @param response Code identifying the reason the dialog stopped.
+         */
+        void stop(ResponseCode response);
+
+        /**
+         * Gets the bridge object this Session is associated with.
+         *
+         * @return A proxy to the bridge the session is presently in.
+         *
+         * @throws NotBridged if the session is not currently in a bridge.
+         */
+        Bridge* getBridge() throws NotBridged;
+
+        /**
+         * Set the Bridge for this session.
+         *
+         * @param bridge A proxy to the Bridge object this Session should be associated with.
+         *
+         * @param listener A proxy to the Listener to add to the Session.
+         *
+         * @return A current copy of the session information.
+         */
+        SessionInfo setBridge(Bridge* newBridge, SessionListener* listener);
+
+        /**
+         * Removes this Session from it's associated Bridge.
+         *
+         * @param listener Removes the specified listener from the Session.
+         *
+         * @throws NotBridged if the session is not currently in a bridge.
+         */
+        void removeBridge(SessionListener* listener) throws NotBridged;
     };
 
     /**
@@ -399,10 +399,10 @@ module V1
      */
     exception EndpointUnreachableException
     {
-       /**
-	* String containing the destination endpoint that is unreachable.
-	*/
-       string destination;
+        /**
+         * String containing the destination endpoint that is unreachable.
+         */
+        string destination;
     };
 
     /**
@@ -411,8 +411,8 @@ module V1
     exception SessionCreationException
     {
        /**
-	* String containing the endpoint that could not create the session.
-	*/
+        * String containing the endpoint that could not create the session.
+        */
        string destination;
     };
 
@@ -421,10 +421,10 @@ module V1
      */
     exception SourceTerminatedPreBridgingException
     {
-       /**
-	* String containing the endpoint that was terminated.
-	*/
-       string sourceEndpointId;
+        /**
+         * String containing the endpoint that was terminated.
+         */
+        string sourceEndpointId;
     };
 
     /**
@@ -433,13 +433,13 @@ module V1
     exception BridgingException
     {
        /**
-	* String containing the endpoint of the incoming session.
-	*/
+        * String containing the endpoint of the incoming session.
+        */
        string sourceEndpointId;
 
        /**
-	* String containing the endpoint of the outgoing session.
-	*/
+        * String containing the endpoint of the outgoing session.
+        */
        string destination;
     };
 
@@ -461,79 +461,87 @@ module V1
      */
     interface SessionRouter
     {
-	/**
-	 * Attempts to establish an end-to-end communication between an
-	 * existing session and destination identified by an address or ID.
-	 *
-	 * @param source The initiating session.
-	 *
-	 * @param destination The identifier for the destination.
-	 *
-	 * @throws DestinationNotFoundException if the given destination could not be found.
-	 *
-	 * @throws EndpointUnreachableException if the destination endpoint could not be reached.
-	 *
-	 * @throws SessionCreationException if the destination endpoint could not create a session.
-	 *
-	 * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
-	 *
-	 * @throws BridgingException if the bridge could not be setup properly.
-	 */
-	void routeSession(Session* source, string destination)
-	   throws AsteriskSCF::Core::Routing::V1::DestinationNotFoundException,
-	   EndpointUnreachableException, SessionCreationException,
-	   SourceTerminatedPreBridgingException, BridgingException ;
-
-	/**
-	 * Replace one session in a Bridge with a new
-	 * session routable by the destination param.
-	 *
-	 * @param sessionToReplace The session that is to be replaced in a
-	 *   bridge. The bridge obejct is obtained from the accessor on this
-	 *   proxy.
-	 *
-	 * @param destination The identifier for the destination to be added to
-	 *   the bridge in place of sessionToReplace.
-	 *
-	 * @throws DestinationNotFoundException if the given destination could not be found.
-	 *
-	 * @throws SessionCreationException if the destination endpoint could not create a session.
-	 *
-	 * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
-	 *
-	 * @throws BridgingException if the bridge could not be setup properly.
-	 *
-	 * @throws NotBridged if the provided session is not currently in a bridge.
-	 */
-	void connectBridgedSessionsWithDestination(Session* sessionToReplace, string destination)
-	   throws AsteriskSCF::Core::Routing::V1::DestinationNotFoundException,
-	   SessionCreationException,
-	   SourceTerminatedPreBridgingException, BridgingException, NotBridged ;
-
-	/**
-	 * Replace one session in a Bridge with sessions from another bridge.
-	 * No routing is actually performed. This operation exists here for consistency,
-	 * since connectBridgedSessionsWithDestination(...) is implemented by this interface.
-	 *
-	 * @param sessionToReplace The session that is to be replaced in a
-	 *   bridge. The bridge obejct associated with this session will survive, and
-	 *   all sessions bridged to this session will be kept in the bridge.
-	 *
-	 * @param bridgedSession This session is assumed to be bridged to the sessions
-	 *   that are to be moved to another bridge. The bridgedSession itself will not
-	 *   be connected to the other bridge. The sessions being moved will be removed from
-	 *   their current bridge before being added to the bridge currenltly attached to
-	 *   sessionToReplace.
-	 *
-	 *
-	 * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
-	 *
-	 * @throws BridgingException if the bridge could not be setup properly.
-	 *
-	 * @throws NotBridged if the session provided in sessionToReplace is not currently in a bridge.
-	 */
-	void connectBridgedSessions(Session* sessionToReplace, Session* bridgedSession)
-	   throws SourceTerminatedPreBridgingException, BridgingException, NotBridged ;
+        /**
+         * Attempts to establish an end-to-end communication between an
+         * existing session and destination identified by an address or ID.
+         *
+         * @param operationId Unique id for this operation.
+         *
+         * @param source The initiating session.
+         *
+         * @param destination The identifier for the destination.
+         *
+         * @throws DestinationNotFoundException if the given destination could not be found.
+         *
+         * @throws EndpointUnreachableException if the destination endpoint could not be reached.
+         *
+         * @throws SessionCreationException if the destination endpoint could not create a session.
+         *
+         * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
+         *
+         * @throws BridgingException if the bridge could not be setup properly.
+         */
+        ["amd"]
+        void routeSession(string operationId, Session* source, string destination)
+           throws AsteriskSCF::Core::Routing::V1::DestinationNotFoundException,
+           EndpointUnreachableException, SessionCreationException,
+           SourceTerminatedPreBridgingException, BridgingException ;
+
+        /**
+         * Replace one session in a Bridge with a new
+         * session routable by the destination param.
+         *
+         * @param operationId Unique id for this operation.
+         *
+         * @param sessionToReplace The session that is to be replaced in a
+         *   bridge. The bridge obejct is obtained from the accessor on this
+         *   proxy.
+         *
+         * @param destination The identifier for the destination to be added to
+         *   the bridge in place of sessionToReplace.
+         *
+         * @throws DestinationNotFoundException if the given destination could not be found.
+         *
+         * @throws SessionCreationException if the destination endpoint could not create a session.
+         *
+         * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
+         *
+         * @throws BridgingException if the bridge could not be setup properly.
+         *
+         * @throws NotBridged if the provided session is not currently in a bridge.
+         */
+        ["amd"]
+        void connectBridgedSessionsWithDestination(string operationId, Session* sessionToReplace, string destination)
+           throws AsteriskSCF::Core::Routing::V1::DestinationNotFoundException,
+           SessionCreationException,
+           SourceTerminatedPreBridgingException, BridgingException, NotBridged ;
+
+        /**
+         * Replace one session in a Bridge with sessions from another bridge.
+         * No routing is actually performed. This operation exists here for consistency,
+         * since connectBridgedSessionsWithDestination(...) is implemented by this interface.
+         *
+         * @param operationId Unique id for this operation.
+         *
+         * @param sessionToReplace The session that is to be replaced in a
+         *   bridge. The bridge obejct associated with this session will survive, and
+         *   all sessions bridged to this session will be kept in the bridge.
+         *
+         * @param bridgedSession This session is assumed to be bridged to the sessions
+         *   that are to be moved to another bridge. The bridgedSession itself will not
+         *   be connected to the other bridge. The sessions being moved will be removed from
+         *   their current bridge before being added to the bridge currenltly attached to
+         *   sessionToReplace.
+         *
+         * @throws SourceTerminatedPreBridgingException if the source session was terminated early.
+         *
+         * @throws BridgingException if the bridge could not be setup properly.
+         *
+         * @throws NotBridged if the session provided in sessionToReplace is not currently in a bridge.
+         */
+        ["amd"]
+        void connectBridgedSessions(string operationId, Session* sessionToReplace, Session* bridgedSession)
+           throws SourceTerminatedPreBridgingException, BridgingException, NotBridged ;
     };
 
     /**
@@ -542,27 +550,27 @@ module V1
      */
     interface SessionEndpoint extends AsteriskSCF::Core::Endpoint::V1::BaseEndpoint
     {
-	/**
-	 * Creates a session for the specified destination, optionally registering
-	 * a SessionListener object for notification of changes to the session.
-	 *
-	 * @param destination A stringified identifier or address for the destination.
-	 *
-	 * @param callback A SessionListener object to be registered as a listener on the
-	 *    newly created session. May be a nil reference if an initial listener is not
-	 *    required.
-	 *
-	 * @return A newly created session object for the destination.
-	 *
-	 */
-	Session* createSession(string destination, SessionListener* callback);
-
-	/**
-	 * Returns the active sessions for this session endpoint.
-	 *
-	 * @return a sequence of Session proxies.
-	 */
-	idempotent SessionSeq getSessions();
+        /**
+         * Creates a session for the specified destination, optionally registering
+         * a SessionListener object for notification of changes to the session.
+         *
+         * @param destination A stringified identifier or address for the destination.
+         *
+         * @param callback A SessionListener object to be registered as a listener on the
+         *    newly created session. May be a nil reference if an initial listener is not
+         *    required.
+         *
+         * @return A newly created session object for the destination.
+         *
+         */
+        Session* createSession(string destination, SessionListener* callback);
+
+        /**
+         * Returns the active sessions for this session endpoint.
+         *
+         * @return a sequence of Session proxies.
+         */
+        idempotent SessionSeq getSessions();
     };
 
     /**
@@ -578,7 +586,7 @@ module V1
      */
     exception InvalidSessions
     {
-	Ice::LongSeq indexes;
+        Ice::LongSeq indexes;
     };
 
     /**
@@ -606,7 +614,7 @@ module V1
     /**
      * The bridge throws SessionNotFound exception if a specified session is
      * not currently on the bridge.
-     **/
+     */
     exception SessionNotFound
     {
         Session* missingSession;
@@ -624,86 +632,86 @@ module V1
     interface Bridge
     {
        /**
-	* Add a sequence of session proxies to the bridge. Sessions are started
-	* if necessary.
-	*
-	* @param session A sequence of session proxies.
-	*
-	* @throws InvalidSessions if any of the provided sessions are invalid.
-	*
-	* @see Session
-	* @see InvalidSessions
-	*/
+        * Add a sequence of session proxies to the bridge. Sessions are started
+        * if necessary.
+        *
+        * @param session A sequence of session proxies.
+        *
+        * @throws InvalidSessions if any of the provided sessions are invalid.
+        *
+        * @see Session
+        * @see InvalidSessions
+        */
        ["amd"]
        void addSessions(SessionSeq session)
        throws InvalidSessions, BridgeSessionOperationFailed;
 
        /**
-	* Abruptly destroy the bridge. Sessions will not be stopped.
-	*/
+        * Abruptly destroy the bridge. Sessions will not be stopped.
+        */
        void destroy();
 
        /**
-	* List the sessions currently on the bridge.
-	*
-	* @return a sequence of session proxies participating in the bridge.
-	*/
+        * List the sessions currently on the bridge.
+        *
+        * @return a sequence of session proxies participating in the bridge.
+        */
        idempotent SessionSeq listSessions();
 
        /**
-	* Removes one or more sessions from the bridge. Sessions are not stopped
-	* as they are removed.
-	*
-	* @param sessions A sequence of session proxies.
-	*
-	* @throws InvalidSessions if any of the provided sessions are invalid.
-	*
-	* @see Session
-	* @see InvalidSessions
-	*/
-        ["amd"]
+        * Removes one or more sessions from the bridge. Sessions are not stopped
+        * as they are removed.
+        *
+        * @param sessions A sequence of session proxies.
+        *
+        * @throws InvalidSessions if any of the provided sessions are invalid.
+        *
+        * @see Session
+        * @see InvalidSessions
+        */
+       ["amd"]
        void removeSessions(SessionSeq sessions)
         throws InvalidSessions, BridgeSessionOperationFailed;
 
        /**
-	* Nicely shutdown the bridge. Participating sessions are disconnected.
-	*/
+        * Nicely shutdown the bridge. Participating sessions are disconnected.
+        */
        void shutdown();
 
        /**
-	* Adds a listener object to the bridge. The listener will receive notification
-	* of future changes to the bridge as they occur.
-	*
-	* @param listener A reference to a BridgeListener object.
-	*
-	* @see BridgeListener
-	*/
+        * Adds a listener object to the bridge. The listener will receive notification
+        * of future changes to the bridge as they occur.
+        *
+        * @param listener A reference to a BridgeListener object.
+        *
+        * @see BridgeListener
+        */
        void addListener(BridgeListener* listener);
 
        /**
-	* Removes a listener object from the bridge. The listen will cease receiving
-	* notifications of changes to the bridge.
-	*
-	* @param listener A reference to the listener object to be removed.
-	*
-	* @see BridgeListener
-	*/
+        * Removes a listener object from the bridge. The listen will cease receiving
+        * notifications of changes to the bridge.
+        *
+        * @param listener A reference to the listener object to be removed.
+        *
+        * @see BridgeListener
+        */
        void removeListener(BridgeListener* listener);
 
        /**
-	* Replaces a session that is on the bridge with another session. Useful for transfers, etc.
-	* where a participant is replaced as part of the code flow.
-	*
-	* @param sessionToReplace The session being replaced. The bridge associated with this
-	*   session is used for the newSessions.
-	*
-	* @param newSessions The sessions to add to the bridge. The sessions are assumed to not
-	*   be already participating in another bridge.
-	*
-	* @throws InvalidSessions if any of the provided sessions are invalid.
+        * Replaces a session that is on the bridge with another session. Useful for transfers, etc.
+        * where a participant is replaced as part of the code flow.
+        *
+        * @param sessionToReplace The session being replaced. The bridge associated with this
+        *   session is used for the newSessions.
+        *
+        * @param newSessions The sessions to add to the bridge. The sessions are assumed to not
+        *   be already participating in another bridge.
+        *
+        * @throws InvalidSessions if any of the provided sessions are invalid.
         *
         * @throws SessionNotFound if the session to be replaced is not on the bridge.
-	*/
+        */
        ["amd"]
        void replaceSession(Session* sessionToReplace, SessionSeq newSessions)
            throws InvalidSessions, SessionNotFound, BridgeSessionOperationFailed;
@@ -719,36 +727,36 @@ module V1
     interface BridgeListener
     {
        /**
-	* Called when sessions have been added to a bridge.
-	*
-	* @param sessionBridge The bridge object the sessions were added to.
-	*
-	* @param sessions A sequence of session proxies that were added to the bridge.
-	*/
+        * Called when sessions have been added to a bridge.
+        *
+        * @param sessionBridge The bridge object the sessions were added to.
+        *
+        * @param sessions A sequence of session proxies that were added to the bridge.
+        */
        void sessionsAdded(Bridge* sessionBridge, SessionSeq sessions);
 
        /**
-	* Called when sessions have been removed from a bridge.
-	*
-	* @param sessionBridge The bridge object the sessions were removed from.
-	*
-	* @param sessions A sequence of session proxies that were removed from
-	* the bridge.
-	*/
+        * Called when sessions have been removed from a bridge.
+        *
+        * @param sessionBridge The bridge object the sessions were removed from.
+        *
+        * @param sessions A sequence of session proxies that were removed from
+        * the bridge.
+        */
        void sessionsRemoved(Bridge* sessionBridge, SessionSeq sessions);
 
        /**
-	* Called when a bridge has completed shutdown/destruction.
-	*
-	* @param sessionBridge The bridge that was stopped.
-	*/
+        * Called when a bridge has completed shutdown/destruction.
+        *
+        * @param sessionBridge The bridge that was stopped.
+        */
        void stopped(Bridge* sessionBridge);
 
        /**
-	* Called when a bridge has started shutdown/destruction operations.
-	*
-	* @param sessionBrdige The bridge that is stopping.
-	*/
+        * Called when a bridge has started shutdown/destruction operations.
+        *
+        * @param sessionBrdige The bridge that is stopping.
+        */
        void stopping(Bridge* sessionBridge);
     };
 
@@ -768,66 +776,66 @@ module V1
     interface BridgeManager
     {
        /**
-	* Method called to add a listener to the bridge manager.
-	*
-	* @param listener A proxy to the bridge manager listener to add.
-	*/
-	void addListener(BridgeManagerListener* listener);
-
-	/**
-	 * Method called to create a bridge.
-	 *
-	 * @param sessions A sequence of session proxies to be placed into the newly created bridge.
-	 *
-	 * @param listener A proxy to a bridge listener to be added to the newly created ridge.
-	 *
-	 * @return Bridge* Returns a proxy to the newly created bridge.
-	 */
+        * Method called to add a listener to the bridge manager.
+        *
+        * @param listener A proxy to the bridge manager listener to add.
+        */
+        void addListener(BridgeManagerListener* listener);
+
+        /**
+         * Method called to create a bridge.
+         *
+         * @param sessions A sequence of session proxies to be placed into the newly created bridge.
+         *
+         * @param listener A proxy to a bridge listener to be added to the newly created ridge.
+         *
+         * @return Bridge* Returns a proxy to the newly created bridge.
+         */
         ["amd"]
-	Bridge* createBridge(SessionSeq sessions, BridgeListener* listener);
+        Bridge* createBridge(SessionSeq sessions, BridgeListener* listener);
 
-	/**
-	 * Method called to remove a listener from the bridge manager.
-	 *
-	 * @param listener A proxy to the bridge manager listener to remove.
-	 */
-	void removeListener(BridgeManagerListener* listener);
+        /**
+         * Method called to remove a listener from the bridge manager.
+         *
+         * @param listener A proxy to the bridge manager listener to remove.
+         */
+        void removeListener(BridgeManagerListener* listener);
 
        /**
         * Method called to add a listener to the list of bridge listeners that
         * will automatically be added to every bridge that is created.
-	*
-	* @param listener A proxy to the bridge listener to add.
+        *
+        * @param listener A proxy to the bridge listener to add.
         *
         * @throws NullProxyException if the listener proxy is a null proxy.
         *
-	*/
+        */
         void addDefaultBridgeListener(BridgeListener* listener)
             throws AsteriskSCF::System::V1::NullProxyException;
 
        /**
         * Method called to remove a listener to the list of bridge listeners that
         * will automatically be added to every bridge that is created.
-	*
-	* @param listener A proxy to the bridge listener to remove.
+        *
+        * @param listener A proxy to the bridge listener to remove.
         *
         * @throws NullProxyException if the listener proxy is a null proxy.
         *
-	*/
+        */
         void removeDefaultBridgeListener(BridgeListener* listener)
             throws AsteriskSCF::System::V1::NullProxyException;
 
-	/**
-	 * Method called to get a list of bridges currently active in the bridge manager.
-	 *
-	 * @return BridgeSeq a sequence of proxies to the bridges that are active.
-	 */
-	idempotent BridgeSeq listBridges();
+        /**
+         * Method called to get a list of bridges currently active in the bridge manager.
+         *
+         * @return BridgeSeq a sequence of proxies to the bridges that are active.
+         */
+        idempotent BridgeSeq listBridges();
 
-	/**
-	 * Method called to shut down the bridge manager.
-	 */
-	void shutdown();
+        /**
+         * Method called to shut down the bridge manager.
+         */
+        void shutdown();
     };
 
     /**
@@ -836,88 +844,94 @@ module V1
     interface BridgeManagerListener
     {
        /**
-	* Notice that a bridge was created.
-	*
-	* @param manager A proxy to the bridge manager that created the bridge.
-	*
-	* @param newBridge A proxy to the newly created bridge.
-	*/
-	void bridgeCreated(BridgeManager* manager, Bridge* newBridge);
-
-	/**
-	 * Notice that a bridge manager has stopped.
-	 *
-	 * @param manager The bridge manager that has stopped.
-	 */
-	void stopped(BridgeManager* manager);
-
-	/**
-	 * Notice that a bridge manager is stopping.
-	 *
-	 * @param manager The bridge manager that is stopping.
-	 */
-	void stopping(BridgeManager* manager);
+        * Notice that a bridge was created.
+        *
+        * @param manager A proxy to the bridge manager that created the bridge.
+        *
+        * @param newBridge A proxy to the newly created bridge.
+        */
+        void bridgeCreated(BridgeManager* manager, Bridge* newBridge);
+
+        /**
+         * Notice that a bridge manager has stopped.
+         *
+         * @param manager The bridge manager that has stopped.
+         */
+        void stopped(BridgeManager* manager);
+
+        /**
+         * Notice that a bridge manager is stopping.
+         *
+         * @param manager The bridge manager that is stopping.
+         */
+        void stopping(BridgeManager* manager);
     };
 
     module Event
     {
        /**
-	* String name of the IceStorm topic used for session router related events.
-	*/
+        * String name of the IceStorm topic used for session router related events.
+        */
        const string TopicId = "::asteriskscf::session::sessionrouter::event";
 
        /**
-	* An enum for whether the result of an operation was successful or not
-	*/
+        * An enum for whether the result of an operation was successful or not
+        */
        enum OperationResult
        {
-	  SUCCESS,
-	  FAILURE
+           SUCCESS,
+           FAILURE
        };
 
        /**
-	* Interface for monitoring session router events.
-	*/
+        * Interface for monitoring session router events.
+        */
        interface SessionRouterEvents
        {
-	  /**
-	   * Notice that routeSession operation was called.
-	   *
-	   * @param source The initiating session.
-	   *
-	   * @param destination The identifier for the destination.
-	   *
-	   * @param result Operation outcome.
-	   */
-	  void routeSessionEvent(Session* source, string destination, OperationResult result);
-
-	  /**
-	   * Notice that connectBridgedSessionsWithDestinationEvent operation was called.
-	   *
-	   * @param sessionToReplace The session that is to be replaced in the
-	   *   bridge. The bridge obejct is obtained from the accessor on this
-	   *   proxy.
-	   *
-	   * @param destination The identifier for the destination.
-	   *
-	   * @param result Operation outcome.
-	   */
-	  void connectBridgedSessionsWithDestinationEvent(Session* sessionToReplace, string destination, OperationResult result);
-
-	  /**
-	   * Notice that connectBridgedSessionsEvent operation was called.
-	   *
-	   * @param sessionToReplace The session that is to be replaced in the
-	   *   bridge. The bridge obejct is obtained from the accessor on this
-	   *   proxy.
-	   *
-	   * @param bridgedSession This session is assumed to be bridged to the sessions
-	   *   that are to be moved to another bridge. The bridgedSession itself will not
-	   *   be connected to the other bridge.
-	   *
-	   * @param result Operation outcome.
-	   */
-	  void connectBridgedSessionsEvent(Session* sessionToReplace, Session* bridgedSession, OperationResult result);
+          /**
+           * Notice that routeSession operation was called.
+           *
+           * @param operationId Unique id for this operation.
+           *
+           * @param source The initiating session.
+           *
+           * @param destination The identifier for the destination.
+           *
+           * @param result Operation outcome.
+           */
+          void routeSessionEvent(string operationId, Session* source, string destination, OperationResult result);
+
+          /**
+           * Notice that connectBridgedSessionsWithDestinationEvent operation was called.
+           *
+           * @param operationId Unique id for this operation.
+           *
+           * @param sessionToReplace The session that is to be replaced in the
+           *   bridge. The bridge obejct is obtained from the accessor on this
+           *   proxy.
+           *
+           * @param destination The identifier for the destination.
+           *
+           * @param result Operation outcome.
+           */
+          void connectBridgedSessionsWithDestinationEvent(string operationId, Session* sessionToReplace, string destination, OperationResult result);
+
+          /**
+           * Notice that connectBridgedSessionsEvent operation was called.
+           *
+           * @param operationId Unique id for this operation.
+           *
+           * @param sessionToReplace The session that is to be replaced in the
+           *   bridge. The bridge obejct is obtained from the accessor on this
+           *   proxy.
+           *
+           * @param bridgedSession This session is assumed to be bridged to the sessions
+           *   that are to be moved to another bridge. The bridgedSession itself will not
+           *   be connected to the other bridge.
+           *
+           * @param result Operation outcome.
+           */
+          void connectBridgedSessionsEvent(string operationId, Session* sessionToReplace, Session* bridgedSession, OperationResult result);
        };
 
     }; /* End of module Event */
diff --git a/AsteriskSCF/System/Component/ComponentServiceIf.ice b/AsteriskSCF/System/Component/ComponentServiceIf.ice
index d374e29..b6db122 100644
--- a/AsteriskSCF/System/Component/ComponentServiceIf.ice
+++ b/AsteriskSCF/System/Component/ComponentServiceIf.ice
@@ -17,7 +17,7 @@
 #pragma once
 
 module AsteriskSCF
-{
+{ 
 
 module System
 {
@@ -46,39 +46,69 @@ module V1
    exception Suspended { };
 
    /**
-    * Service is the base interface for all AsteriskSCF services. Most components will include an implementation
+    * This is the base interface for all AsteriskSCF services. Most components will include an implementation
     * of this or a derived interface.
     */
-   interface ComponentService
-   {
-      /**
-       * Suspends activity in the service. In general this means that the primary activity of a service
-       * is suspended. Queries about state etc, may or may not be available. Calling suspend on a service
-       * that is suspended should be treated as a no-op.
-       *
-       * @throws ShuttingDown if the service is in the process of shutting down.
-       */
-      void suspend() throws ShuttingDown;
-
-      /**
-       * Resumes a service that has been suspended. After this call returns the suspended service
-       * must be ready to handle requests in a manner consistent with its state at the time the service
-       * was suspended.
-       *
-       * @throws ShuttingDown if the service is in the process of shutting down.
-       */
-      void resume() throws ShuttingDown;
-
-      /**
-       * Commences a clean shutdown of the services. The details of shutdown are implementation specific.
-       * For example, some services will begin to reject requests immediately after being shutdown but
-       * resume requests currently being handled. Others might abort requests in progress. A component
-       * implementing this interface should indicate if requests will be aborted or not on shutdown.
-       *
-       * @throws Suspended if the service is suspended.
-       */
-      void shutdown() throws Suspended;
-   };
+    interface ComponentService
+    {
+        /**
+         * Suspends activity in the service. In general this means that the primary activity of a service
+         * is suspended. Queries about state etc, may or may not be available. Calling suspend on a service
+         * that is suspended should be treated as a no-op.
+         *
+         * @throws ShuttingDown if the service is in the process of shutting down.
+         */
+        void suspend() throws ShuttingDown;
+
+        /**
+         * Resumes a service that has been suspended. After this call returns the suspended service
+         * must be ready to handle requests in a manner consistent with its state at the time the service
+         * was suspended.
+         *
+         * @throws ShuttingDown if the service is in the process of shutting down.
+         */
+        void resume() throws ShuttingDown;
+
+        /**
+         * Commences a clean shutdown of the services. The details of shutdown are implementation specific.
+         * For example, some services will begin to reject requests immediately after being shutdown but
+         * resume requests currently being handled. Others might abort requests in progress. A component
+         * implementing this interface should indicate if requests will be aborted or not on shutdown.
+         *
+         * @throws Suspended if the service is suspended.
+         */
+         void shutdown() throws Suspended;
+    };
+
+    /** 
+     * A base class to enable arbitary parameter passing to the ComponentTest inteface.
+     */
+    class ComponentTestParam {};
+    sequence<ComponentTestParam> ComponentTestParamSeq;
+
+    const string ComponentTestFacet = "TestFacet";
+
+    /**
+     * This interface is expsed as an optional facet on ComponentService. 
+     */
+    interface ComponentTest
+    {
+        /** 
+         * Set a test mode. The meaning of the mode is specific
+         * to a given component and it's tests. 
+         */
+        void setTestMode(string mode);
+
+        /** 
+         * Set a test mode with params. The meaning of the mode and paramters is specific
+         * to a given component and it's tests. 
+         */
+        void setTestModeWithArgs(string mode, ComponentTestParamSeq params);
+
+        void clearTestMode(string mode);
+
+        void clearTestModes();
+    };
 
 }; /*  End of V1 */
 

-----------------------------------------------------------------------


-- 
asterisk-scf/release/slice.git



More information about the asterisk-scf-commits mailing list