cvm.ncb.adapters
Class NCBBridge

java.lang.Object
  extended by cvm.ncb.adapters.NCBBridge
Direct Known Subclasses:
GoogleTalkAdapter, JMMLAdapter, NCBNativeAdapter, SkypeAdapter

public abstract class NCBBridge
extends java.lang.Object

Target class of the Abstract design pattern.

Author:
Frank Hernandez

Field Summary
 java.lang.String password
           
 java.lang.String username
           
 
Constructor Summary
NCBBridge()
           
 
Method Summary
abstract  void addParticipant(java.lang.String sID, java.lang.String participantID)
          Adds a participant to the session.
abstract  void createSession(java.lang.String sessionID)
          This function creates a session in the Networks Bridge for the specified session ID.
abstract  void disableMedium(java.lang.String connectionID, java.lang.String mediumName)
          This function is used to disable a communicaciot medium.
abstract  void enableMedium(java.lang.String connectionID, java.lang.String mediumName)
          This function is used to enable a communicaciot medium.
abstract  java.lang.String getCapability()
          This functions returns a coma separated list with the device capabilities.
abstract  boolean isLoggedIn(java.lang.String userName)
          This functions checks if the bridge is looged in with the specified username.
abstract  boolean isSessionCreated(java.lang.String sID)
          Checks is the session is currntly created.
abstract  UserObject login(java.lang.String userName, java.lang.String password)
          This function logs the user into the communication bridge i.e Skype, GTalk...
abstract  void logout(java.lang.String userName)
          Logs the user out of the Bridge.
abstract  void removeParticipant(java.lang.String sID, java.lang.String participant)
          Removes a participant to the session.
abstract  void restartService()
          Restarts the adapter.
abstract  void sendMedia(java.lang.String sid, java.lang.String medium, java.lang.String mediumURL)
           
abstract  void sendSchema(java.lang.String schema, java.lang.String participantID)
          This function sends the schema file to the specified user.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

username

public java.lang.String username

password

public java.lang.String password
Constructor Detail

NCBBridge

public NCBBridge()
Method Detail

getCapability

public abstract java.lang.String getCapability()
This functions returns a coma separated list with the device capabilities.

Returns:
list of capabilities as defined in the NCBBridgeCapability class.
See Also:
NCBBridgeCapability

login

public abstract UserObject login(java.lang.String userName,
                                 java.lang.String password)
                          throws LoginException
This function logs the user into the communication bridge i.e Skype, GTalk...

Parameters:
userName - Username registered under the specific bridge.
password - Password registered under the specific bridge.
Returns:
UserObject with the user infromation.
Throws:
LoginException
See Also:
UserObject

logout

public abstract void logout(java.lang.String userName)
Logs the user out of the Bridge.

Parameters:
userName -

restartService

public abstract void restartService()
Restarts the adapter.


createSession

public abstract void createSession(java.lang.String sessionID)
This function creates a session in the Networks Bridge for the specified session ID.

Parameters:
sessionID - Id of the session to create.

addParticipant

public abstract void addParticipant(java.lang.String sID,
                                    java.lang.String participantID)
                             throws PartyNotAddedException,
                                    NoSessionException
Adds a participant to the session.

Parameters:
sID - Id of the session to add.
participantID - Id of the participant to add. i.e useranem: crinsomkairos.
Throws:
PartyNotAddedException
NoSessionException

removeParticipant

public abstract void removeParticipant(java.lang.String sID,
                                       java.lang.String participant)
                                throws PartyNotFoundException,
                                       NoSessionException
Removes a participant to the session.

Parameters:
sID - Id of the session to remove.
participant - Id of the participant to remove. i.e useranem: crinsomkairos.
Throws:
PartyNotFoundException
NoSessionException

isLoggedIn

public abstract boolean isLoggedIn(java.lang.String userName)
                            throws LoginException
This functions checks if the bridge is looged in with the specified username.

Parameters:
userName - user handle to check for ownership of the Bridge.
Returns:
true if the user is the owner of the bridge.
Throws:
LoginException

isSessionCreated

public abstract boolean isSessionCreated(java.lang.String sID)
Checks is the session is currntly created.

Parameters:
sID - Session to check.
Returns:
true if the session exist.

sendSchema

public abstract void sendSchema(java.lang.String schema,
                                java.lang.String participantID)
This function sends the schema file to the specified user.

Parameters:
schema - Schema File.
participantID - Id of the user.

enableMedium

public abstract void enableMedium(java.lang.String connectionID,
                                  java.lang.String mediumName)
                           throws PartyNotAddedException,
                                  NoSessionException
This function is used to enable a communicaciot medium. This will activate the audio in the communication or chat...

Parameters:
connectionID -
mediumName -
Throws:
PartyNotAddedException
NoSessionException

disableMedium

public abstract void disableMedium(java.lang.String connectionID,
                                   java.lang.String mediumName)
                            throws com.skype.SkypeException,
                                   PartyNotFoundException,
                                   NoSessionException
This function is used to disable a communicaciot medium. This will deactivate the audio in the communication or chat...

Parameters:
connectionID -
mediumName -
Throws:
PartyNotAddedException
NoSessionException
com.skype.SkypeException
PartyNotFoundException

sendMedia

public abstract void sendMedia(java.lang.String sid,
                               java.lang.String medium,
                               java.lang.String mediumURL)