cvm.ncb.adapters
Class NCBNativeAdapter

java.lang.Object
  extended by cvm.ncb.adapters.NCBBridge
      extended by cvm.ncb.adapters.NCBNativeAdapter

public class NCBNativeAdapter
extends NCBBridge

This is an adapter to the NCB interface. This class wraps around the NCB API calls. For starters it performs the basic operations that are required by the basic implementation of CVM but it can be extended to perform all the operations allowed by Skype with the uses of Skype call and chat objects and the connector object. Date: 01/13/2008

Author:
Frank Hernandez
See Also:
Connector

Field Summary
 
Fields inherited from class cvm.ncb.adapters.NCBBridge
password, username
 
Constructor Summary
NCBNativeAdapter()
           
 
Method Summary
 void addParticipant(java.lang.String sID, java.lang.String participantID)
          Adds a participant to the session.
 void createSession(java.lang.String sessionID)
          This function creates a session in the Networks Bridge for the specified session ID.
 void disableMedium(java.lang.String connectionID, java.lang.String mediumName)
          This function is used to disable a communicaciot medium.
 void enableMedium(java.lang.String connectionID, java.lang.String mediumName)
          This function is used to enable a communicaciot medium.
 java.lang.String getCapability()
          This functions returns a coma separated list with the device capabilities.
 boolean isLoggedIn(java.lang.String userName)
          This functions checks if the bridge is looged in with the specified username.
 boolean isSessionCreated(java.lang.String sID)
          Checks is the session is currntly created.
 UserObject login(java.lang.String userName, java.lang.String password)
          This function logs the user into the communication bridge i.e Skype, GTalk...
 void logout(java.lang.String userName)
          Logs the user out of the Bridge.
 void removeParticipant(java.lang.String sID, java.lang.String participant)
          Removes a participant to the session.
 void restartService()
          Restarts the adapter.
 void sendMedia(java.lang.String sid, java.lang.String medium, java.lang.String mediumURL)
           
 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
 

Constructor Detail

NCBNativeAdapter

public NCBNativeAdapter()
Method Detail

addParticipant

public void addParticipant(java.lang.String sID,
                           java.lang.String participantID)
                    throws PartyNotAddedException
Description copied from class: NCBBridge
Adds a participant to the session.

Specified by:
addParticipant in class NCBBridge
Parameters:
sID - Id of the session to add.
participantID - Id of the participant to add. i.e useranem: crinsomkairos.
Throws:
PartyNotAddedException

createSession

public void createSession(java.lang.String sessionID)
Description copied from class: NCBBridge
This function creates a session in the Networks Bridge for the specified session ID.

Specified by:
createSession in class NCBBridge
Parameters:
sessionID - Id of the session to create.

getCapability

public java.lang.String getCapability()
Description copied from class: NCBBridge
This functions returns a coma separated list with the device capabilities.

Specified by:
getCapability in class NCBBridge
Returns:
list of capabilities as defined in the NCBBridgeCapability class.
See Also:
NCBBridgeCapability

isLoggedIn

public boolean isLoggedIn(java.lang.String userName)
Description copied from class: NCBBridge
This functions checks if the bridge is looged in with the specified username.

Specified by:
isLoggedIn in class NCBBridge
Parameters:
userName - user handle to check for ownership of the Bridge.
Returns:
true if the user is the owner of the bridge.

login

public UserObject login(java.lang.String userName,
                        java.lang.String password)
                 throws LoginException
Description copied from class: NCBBridge
This function logs the user into the communication bridge i.e Skype, GTalk...

Specified by:
login in class NCBBridge
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 void logout(java.lang.String userName)
Description copied from class: NCBBridge
Logs the user out of the Bridge.

Specified by:
logout in class NCBBridge

removeParticipant

public void removeParticipant(java.lang.String sID,
                              java.lang.String participant)
                       throws PartyNotFoundException
Description copied from class: NCBBridge
Removes a participant to the session.

Specified by:
removeParticipant in class NCBBridge
Parameters:
sID - Id of the session to remove.
participant - Id of the participant to remove. i.e useranem: crinsomkairos.
Throws:
PartyNotFoundException

restartService

public void restartService()
Description copied from class: NCBBridge
Restarts the adapter.

Specified by:
restartService in class NCBBridge

isSessionCreated

public boolean isSessionCreated(java.lang.String sID)
Description copied from class: NCBBridge
Checks is the session is currntly created.

Specified by:
isSessionCreated in class NCBBridge
Parameters:
sID - Session to check.
Returns:
true if the session exist.

sendSchema

public void sendSchema(java.lang.String schema,
                       java.lang.String participantID)
Description copied from class: NCBBridge
This function sends the schema file to the specified user.

Specified by:
sendSchema in class NCBBridge
Parameters:
schema - Schema File.
participantID - Id of the user.

disableMedium

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

Specified by:
disableMedium in class NCBBridge
Throws:
NoSessionException
com.skype.SkypeException
PartyNotFoundException

enableMedium

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

Specified by:
enableMedium in class NCBBridge
Throws:
PartyNotAddedException
NoSessionException

sendMedia

public void sendMedia(java.lang.String sid,
                      java.lang.String medium,
                      java.lang.String mediumURL)
Specified by:
sendMedia in class NCBBridge