Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.protocol.sip
Class EventPackageSubscriber.Subscription

java.lang.Object
  extended by net.java.sip.communicator.impl.protocol.sip.EventPackageSupport.Subscription
      extended by net.java.sip.communicator.impl.protocol.sip.EventPackageSubscriber.Subscription
Enclosing class:
EventPackageSubscriber

public abstract static class EventPackageSubscriber.Subscription
extends EventPackageSupport.Subscription

Represents a general event package subscription in the sense of RFC 3265 "Session Initiation Protocol (SIP)-Specific Event Notification" from the point of view of the subscriber and its signaling characteristics such as Request URI, id tag value of its Event header, the Dialog which has been created by the associated SUBSCRIBE request or through which it was sent. Additionally, represents the subscription-specific processing of the related Requests and Response s thus allowing implementers to tap into the general event package subscription operations and provide the event package-specific processing.

Author:
Lubomir Marinov

Field Summary
 
Fields inherited from class net.java.sip.communicator.impl.protocol.sip.EventPackageSupport.Subscription
address, eventId
 
Constructor Summary
EventPackageSubscriber.Subscription(javax.sip.address.Address toAddress)
          Initializes a new Subscription instance with a specific subscription Address/Request URI and an id tag of the associated Event headers of value null.
EventPackageSubscriber.Subscription(javax.sip.address.Address toAddress, String eventId)
          Initializes a new Subscription instance with a specific subscription Address/Request URI and a specific id tag of the associated Event headers.
 
Method Summary
protected abstract  void processActiveRequest(javax.sip.RequestEvent requestEvent, byte[] rawContent)
          Notifies this Subscription that an active NOTIFY Request has been received and it may process the specified raw content carried in it.
protected abstract  void processFailureResponse(javax.sip.ResponseEvent responseEvent, int statusCode)
          Notifies this Subscription that a Response to a previous SUBSCRIBE Request has been received with a status code in the failure range and it may process the status code carried in it.
protected abstract  void processSuccessResponse(javax.sip.ResponseEvent responseEvent, int statusCode)
          Notifies this Subscription that a Response to a previous SUBSCRIBE Request has been received with a status code in the success range and it may process the status code carried in it.
protected abstract  void processTerminatedRequest(javax.sip.RequestEvent requestEvent, String reasonCode)
          Notifies this Subscription that a terminating NOTIFY Request has been received and it may process the reason code carried in it.
 
Methods inherited from class net.java.sip.communicator.impl.protocol.sip.EventPackageSupport.Subscription
addressEquals, equals, getAddress, getDialog, getEventId, removed, setDialog, setTimerTask
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EventPackageSubscriber.Subscription

public EventPackageSubscriber.Subscription(javax.sip.address.Address toAddress)
Initializes a new Subscription instance with a specific subscription Address/Request URI and an id tag of the associated Event headers of value null.

Parameters:
toAddress - the subscription Address/Request URI which is to be the target of the SUBSCRIBE requests associated with the new instance

EventPackageSubscriber.Subscription

public EventPackageSubscriber.Subscription(javax.sip.address.Address toAddress,
                                           String eventId)
Initializes a new Subscription instance with a specific subscription Address/Request URI and a specific id tag of the associated Event headers.

Parameters:
toAddress - the subscription Address/Request URI which is to be the target of the SUBSCRIBE requests associated with the new instance
eventId - the value of the id tag to be placed in the Event headers of the SUBSCRIBE requests created for the new instance and to be present in the received Event headers in order to have the new instance associated with them
Method Detail

processActiveRequest

protected abstract void processActiveRequest(javax.sip.RequestEvent requestEvent,
                                             byte[] rawContent)
Notifies this Subscription that an active NOTIFY Request has been received and it may process the specified raw content carried in it.

Parameters:
requestEvent - the RequestEvent carrying the full details of the received NOTIFY Request including the raw content which may be processed by this Subscription
rawContent - an array of bytes which represents the raw content carried in the body of the received NOTIFY Request and extracted from the specified RequestEvent for the convenience of the implementers

processFailureResponse

protected abstract void processFailureResponse(javax.sip.ResponseEvent responseEvent,
                                               int statusCode)
Notifies this Subscription that a Response to a previous SUBSCRIBE Request has been received with a status code in the failure range and it may process the status code carried in it.

Parameters:
responseEvent - the ResponseEvent carrying the full details of the received Response including the status code which may be processed by this Subscription
statusCode - the status code carried in the Response and extracted from the specified ResponseEvent for the convenience of the implementers

processSuccessResponse

protected abstract void processSuccessResponse(javax.sip.ResponseEvent responseEvent,
                                               int statusCode)
Notifies this Subscription that a Response to a previous SUBSCRIBE Request has been received with a status code in the success range and it may process the status code carried in it.

Parameters:
responseEvent - the ResponseEvent carrying the full details of the received Response including the status code which may be processed by this Subscription
statusCode - the status code carried in the Response and extracted from the specified ResponseEvent for the convenience of the implementers

processTerminatedRequest

protected abstract void processTerminatedRequest(javax.sip.RequestEvent requestEvent,
                                                 String reasonCode)
Notifies this Subscription that a terminating NOTIFY Request has been received and it may process the reason code carried in it.

Parameters:
requestEvent - the RequestEvent carrying the full details of the received NOTIFY Request including the reason code which may be processed by this Subscription
reasonCode - the code of the reason for the termination carried in the NOTIFY Request and extracted from the specified RequestEvent for the convenience of the implementers

Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.