cvm.ncb
Class NetworkCommunicationBroker

java.lang.Object
  extended by cvm.ncb.NetworkCommunicationBroker

public class NetworkCommunicationBroker
extends java.lang.Object

This is the NCB stub class.

Author:
Frank HErnandez

Method Summary
 boolean addParty(java.lang.String sID, java.lang.String participant)
          This method adds a participant.
 boolean createdSession()
          This method signals whether the sessin is created or not.
 void createSession(java.lang.String sID)
          This method creates the given session.
 UserProfile createUserProfile(UserObject usr, java.lang.Object schema)
          This method generates a user profile for the give user.
 java.lang.String getSessionID(java.lang.String connID)
          This method will return the sessionId for the given connection.
static NetworkCommunicationBroker Instance()
          This is the Instance implementation as in the singleton pattern.
 boolean isCreatedSession()
          This method returns whether the session was created or not.
 UserObject login(java.lang.String userName, java.lang.String password)
          This method will attempt login the given user.
 void logout(java.lang.String userName)
          Logs the user out.
 void mapConnToSession(java.lang.String connID, java.lang.String sID)
          This method maps the ConnectionIds to the SessionIds.
 java.lang.String removeParty(java.lang.String sID, java.lang.String participant)
          This method adds the list of participants to the given session.
 void resetNCB()
          Resets the ncb instnace.
 UserSchema retrieveSchemas(java.lang.String userName, java.lang.String password)
          This method returns the schemas for the given user.
 boolean saveSchema(java.lang.Object schema)
          Saves teh given schema.
 boolean sendMedia(java.lang.String sID, java.lang.String medium, java.lang.String mediumURL)
          This command will send the specified medium to all the participants during the connection.
 boolean sendSchema(java.lang.String sID, java.lang.String senderID, java.lang.String listReceiver, java.lang.Object control_xcml)
          This method will send the schema to all participants in the specified connection.
 boolean sendSchema(java.lang.String sID, java.lang.String senderID, java.lang.String listReceiver, java.lang.String control_xcml, java.lang.String data_xcml)
          This methods send a schema to the given user in the given session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isCreatedSession

public boolean isCreatedSession()
This method returns whether the session was created or not.

Returns:
is session created.

mapConnToSession

public void mapConnToSession(java.lang.String connID,
                             java.lang.String sID)
This method maps the ConnectionIds to the SessionIds.

Parameters:
connID -
sID -

getSessionID

public java.lang.String getSessionID(java.lang.String connID)
This method will return the sessionId for the given connection.

Parameters:
connID -
Returns:
session ID

Instance

public static NetworkCommunicationBroker Instance()
This is the Instance implementation as in the singleton pattern.

Returns:
singleton instance

login

public UserObject login(java.lang.String userName,
                        java.lang.String password)
This method will attempt login the given user.

Parameters:
userName -
password -
Returns:
UserObject

createSession

public void createSession(java.lang.String sID)
This method creates the given session.

Parameters:
sID -

retrieveSchemas

public UserSchema retrieveSchemas(java.lang.String userName,
                                  java.lang.String password)
This method returns the schemas for the given user.

Parameters:
userName -
password -
Returns:
UserSchema

createdSession

public boolean createdSession()
This method signals whether the sessin is created or not.

Returns:
true on success

createUserProfile

public UserProfile createUserProfile(UserObject usr,
                                     java.lang.Object schema)
This method generates a user profile for the give user.

Parameters:
usr -
schema -
Returns:
UserProfile object

addParty

public boolean addParty(java.lang.String sID,
                        java.lang.String participant)
This method adds a participant. to the given session.

Parameters:
sID -
participant -
Returns:
true on success

removeParty

public java.lang.String removeParty(java.lang.String sID,
                                    java.lang.String participant)
This method adds the list of participants to the given session. RIGHT WAY

Parameters:
sID -
participant -
Returns:
participant removed

sendSchema

public boolean sendSchema(java.lang.String sID,
                          java.lang.String senderID,
                          java.lang.String listReceiver,
                          java.lang.String control_xcml,
                          java.lang.String data_xcml)
This methods send a schema to the given user in the given session.

Parameters:
sID -
senderID -
listReceiver -
control_xcml -
data_xcml -
Returns:
true

sendSchema

public boolean sendSchema(java.lang.String sID,
                          java.lang.String senderID,
                          java.lang.String listReceiver,
                          java.lang.Object control_xcml)
This method will send the schema to all participants in the specified connection.

Parameters:
sID -
senderID -
listReceiver -
control_xcml -
Returns:
true

sendMedia

public boolean sendMedia(java.lang.String sID,
                         java.lang.String medium,
                         java.lang.String mediumURL)
This command will send the specified medium to all the participants during the connection.

Parameters:
sID -
medium -
mediumURL -
Returns:
true

saveSchema

public boolean saveSchema(java.lang.Object schema)
Saves teh given schema.

Parameters:
schema -

logout

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

Parameters:
userName -

resetNCB

public void resetNCB()
Resets the ncb instnace.