org.eclipse.ecf.telephony.call.events
Interface ICallSessionRequestEvent


public interface ICallSessionRequestEvent

Event received when a call request is received.


Method Summary
 ICallSession accept(ICallSessionListener listener, java.util.Map properties)
          Accept the incoming call request.
 CallSessionState getCallSessionState()
          Get CallSessionState for this request.
 ID getInitiator()
          Get the ID of the call initiator.
 java.util.Map getProperties()
          Get map of properties associated with the call request.
 ID getReceiver()
          Get the ID of the intended call receiver.
 ID getSessionID()
          Get ID uniquely identifying the call session.
 void reject()
          Reject the incoming call request.
 

Method Detail

getInitiator

ID getInitiator()
Get the ID of the call initiator.

Returns:
ID of initiator. Will not be null.

getReceiver

ID getReceiver()
Get the ID of the intended call receiver. Should be an ID known to this receiver.

Returns:
ID of intended receiver. Will not be null.

getSessionID

ID getSessionID()
Get ID uniquely identifying the call session.

Returns:
ID identifying the call session. Will not be null.

getProperties

java.util.Map getProperties()
Get map of properties associated with the call request.

Returns:
Map of properties associated with the call request. Will not be null.

getCallSessionState

CallSessionState getCallSessionState()
Get CallSessionState for this request. Typically, the returned CallSessionState instance will be CallSessionState.PENDING, meaning that the call is pending subsequent acceptance by this request listener (via athe accept(ICallSessionListener, Map) call. Can be other values, however, depending upon the actual call state.

Returns:
CallSessionState the

accept

ICallSession accept(ICallSessionListener listener,
                    java.util.Map properties)
                    throws CallException
Accept the incoming call request. If the call is to be answered, receivers of this event should call this method and provide the appropriate listener and optional properties. Either this method or the reject() method should be called, depending upon whether the call should be accepted (answered) or not.

Parameters:
listener - the ICallSessionListener to handle ICallSessionEvents. Must not be null.
Returns:
ICallSession that represents the call session once answered/accepted.
Throws:
CallException - if some problem accepting the requested call (e.g. the initiator has dropped).

reject

void reject()
Reject the incoming call request. If the call is to be rejected, receivers of this event should call this method. Either this method or the accept(ICallSessionListener, Map) method should be called, depending upon whether the call should be rejected or accepted (answered). If accept(ICallSessionListener, Map) has previously been called successfully, calling this method has no effect.