hr.fer.tel.nims.dsa.client
Class SignalingAgent

java.lang.Object
  extended by hr.fer.tel.nims.dsa.client.SignalingAgent

public class SignalingAgent
extends java.lang.Object

SignalingAgent handles is responsible for handling all the signalization traffic between client and server.

Author:
Ivan Piskovic

Constructor Summary
SignalingAgent(SignalingEventListener signalingEventListener, java.lang.String configurationFile)
          Creates the SignalingAgent.
 
Method Summary
 void acceptParameterOffer(java.lang.String sdpParameters)
          Accept parameter offer.
 void changeInClientProfile(java.lang.String sessionDescription)
          Changes the session parameters.
 void changeInServiceRequirements(java.lang.String sessionDescription)
          Reserves required resources specified in the sessionDescription or releases previously reserved resources.
 void establishSession(java.lang.String sessionDescription)
          Establishes session with the server, sets the session parameters and reserves the resources specified in the session description.
 void register(java.lang.String userName)
           
 void setServiceSIPURI(java.lang.String serviceSIPURI)
          Sets SIP URI of the end point application sever.
 void setUserName(java.lang.String userName)
           
 void terminateSession()
          Terminates the session.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SignalingAgent

public SignalingAgent(SignalingEventListener signalingEventListener,
                      java.lang.String configurationFile)
               throws SignalingAgentException
Creates the SignalingAgent. This constructor initializes and starts all signaling entities.

Parameters:
signalingEventListener - class that implements SignalingEventListener inteface with event triggers for the application.
configurationFile - path to the configuration file.
Throws:
SignalingAgentException - if configuration file could not be found or signalingEventListener was not set.
Method Detail

establishSession

public void establishSession(java.lang.String sessionDescription)
                      throws SignalingAgentException
Establishes session with the server, sets the session parameters and reserves the resources specified in the session description.

Parameters:
sessionDescription - session parameters that are sent to the server for session establishment.
Throws:
SignalingAgentException - if a message could not be sent.

terminateSession

public void terminateSession()
                      throws SignalingAgentException
Terminates the session.

Throws:
SignalingAgentException - if a message could not be created or sent.

changeInClientProfile

public void changeInClientProfile(java.lang.String sessionDescription)
                           throws SignalingAgentException
Changes the session parameters. This method can be called only after initial session establishment.

Parameters:
sessionDescription - new session description that is to be sent in the body of a message.
Throws:
SignalingAgentException - if a message could not be created or sent.

changeInServiceRequirements

public void changeInServiceRequirements(java.lang.String sessionDescription)
                                 throws SignalingAgentException
Reserves required resources specified in the sessionDescription or releases previously reserved resources.

Parameters:
sessionDescription - session parameters that are used for resource reservation or release of reserved resources.
Throws:
SignalingAgentException - if method is called prior to the session establishment.

setServiceSIPURI

public void setServiceSIPURI(java.lang.String serviceSIPURI)
                      throws SignalingAgentException
Sets SIP URI of the end point application sever. Also checks the format of the SIP URI.

Parameters:
serviceSIPURI - SIP URI of the end point application server.
Throws:
SignalingAgentException - if the format of SIP URI is invalid.

setUserName

public void setUserName(java.lang.String userName)

register

public void register(java.lang.String userName)
              throws SignalingAgentException
Throws:
SignalingAgentException

acceptParameterOffer

public void acceptParameterOffer(java.lang.String sdpParameters)
Accept parameter offer.

Parameters:
sdpParameters - session parameters that were accepted