cvm.se.communication
Class CommunicationProcessManager

java.lang.Object
  extended by cvm.se.communication.CommunicationProcessManager

public class CommunicationProcessManager
extends java.lang.Object

This class handles the managing of communication processes. Give a shcema it will separate it into communication shemas and create or load communication porcesss to handel the specific communication.

Author:
Eddie Incer, Frank Hernandez, Raidel Batista

Method Summary
 CommunicationProcess getCommProc(java.lang.String pID)
          Returns a process from the communication manager based on the process id
static CommunicationProcessManager getInstance()
          Singleton implementation.
 void handleCommunications(ControlSchema schemaUCI)
          This function receives the control schema from UCI.
 void handleDataSchema(DataSchema mDataSchema)
           
 void KillSpecificProcess(java.lang.String pID)
          This function kills the process specified by the pID
 void receiveCommunication(NegotiationSchema negSchema)
          Given a negotiation schema, it looks up the the communication process.
 void SignalKillIntent(java.lang.String pID)
          This method signals a communication object to die in a clean way.
 void UpdateSpecificCommunication(java.lang.String pID)
          Finds the process for which the negotiation signal was sent, and handles update in communication.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CommunicationProcessManager getInstance()
Singleton implementation.

Returns:
CommunicationProcessManager instance

handleCommunications

public void handleCommunications(ControlSchema schemaUCI)
This function receives the control schema from UCI. It splits the schema into communictation schema. For every communication schema it, searches for the communication process, if it doesn't exist create create the process. Give the connection schema to the process for handling spefic communication.

Parameters:
schemaUCI -

receiveCommunication

public void receiveCommunication(NegotiationSchema negSchema)
Given a negotiation schema, it looks up the the communication process. Called from SE Event Handler.

Parameters:
negSchema -

KillSpecificProcess

public void KillSpecificProcess(java.lang.String pID)
This function kills the process specified by the pID

Parameters:
pID - ID of the process to kill;

SignalKillIntent

public void SignalKillIntent(java.lang.String pID)
This method signals a communication object to die in a clean way.

Parameters:
pID -

UpdateSpecificCommunication

public void UpdateSpecificCommunication(java.lang.String pID)
Finds the process for which the negotiation signal was sent, and handles update in communication.

Parameters:
pID -

handleDataSchema

public void handleDataSchema(DataSchema mDataSchema)

getCommProc

public CommunicationProcess getCommProc(java.lang.String pID)
Returns a process from the communication manager based on the process id

Parameters:
pID -
Returns:
communication process