|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter
net.java.sip.communicator.impl.protocol.sip.EventPackageSupport
public class EventPackageSupport
Provides the base for implementations of RFC 3265 "Session Initiation Protocol (SIP)-Specific Event Notification" and thus eases the creation of event package-specific implementations.
| Nested Class Summary | |
|---|---|
protected static class |
EventPackageSupport.Subscription
Represents a general event package subscription in the sense of RFC 3265 "Session Initiation Protocol (SIP)-Specific Event Notification" and its signaling characteristics such as Request URI, id tag value of its Event header. |
| Field Summary | |
|---|---|
protected String |
contentSubType
The sub-type of the content type of the response bodies announced, expected and supported by the subscriptions/notifications managed by this instance. |
protected String |
eventPackage
The name of the event package this instance implements and carried in the Event and Allow-Events headers. |
protected ProtocolProviderServiceSipImpl |
protocolProvider
The SIP ProtocolProviderService implementation for which
this instance provides support for a specific event package. |
protected int |
subscriptionDuration
The duration of each subscription managed by this instance and carried in the Expires header. |
protected TimerScheduler |
timer
The Timer support which executes the time-based tasks of
this instance. |
| Constructor Summary | |
|---|---|
protected |
EventPackageSupport(ProtocolProviderServiceSipImpl protocolProvider,
String eventPackage,
int subscriptionDuration,
String contentSubType,
TimerScheduler timer)
Initializes a new EventPackageSupport instance which is to
provide support according to RFC 3265 to a specific SIP
ProtocolProviderService implementation for a specific event
package. |
| Method Summary | |
|---|---|
protected void |
addSubscription(String callId,
EventPackageSupport.Subscription subscription)
Adds a specific Subscription associated with a specific CallId to the list of subscriptions managed by this instance. |
String |
getEventPackage()
Gets the name of the event package this instance implements and carried in the Event and Allow-Events headers. |
(package private) static javax.sip.ServerTransaction |
getOrCreateServerTransaction(javax.sip.RequestEvent requestEvent)
Safely returns the ServerTransaction associated with a
specific RequestEvent or creates a new one if the specified
RequestEvent is not associated with one. |
protected EventPackageSupport.Subscription |
getSubscription(javax.sip.address.Address toAddress,
String eventId)
Gets the Subscription from the list of subscriptions managed by this instance which is associated with a specific subscription Address/Request URI and has a specific id tag in its Event header. |
protected EventPackageSupport.Subscription |
getSubscription(String callId)
Gets the Subscription from the list of subscriptions managed by this instance which is associated with a specific CallId. |
protected EventPackageSupport.Subscription[] |
getSubscriptions()
Gets a new copy of the list of Subscriptions managed by this instance. |
protected void |
processAuthenticationChallenge(javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response response,
javax.sip.SipProvider jainSipProvider)
Attempts to re-generate a Request within a specific
ClientTransaction with the proper authorization headers. |
(package private) static void |
processAuthenticationChallenge(ProtocolProviderServiceSipImpl protocolProvider,
javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response response,
javax.sip.SipProvider jainSipProvider)
Attempts to re-generate a Request within a specific
ClientTransaction with the proper authorization headers. |
void |
removeSubscription(javax.sip.address.Address toAddress)
Removes a Subscription from the list of subscriptions managed by this instance which is associated with a specific subscription Address/Request URI and has an id tag in its Event header of null. |
boolean |
removeSubscription(javax.sip.address.Address toAddress,
String eventId)
Removes a Subscription from the list of subscriptions managed by this instance which is associated with a specific subscription Address/Request URI and has a specific id tag in its Event header. |
protected boolean |
removeSubscription(String callId,
EventPackageSupport.Subscription subscription)
Removes a specific Subscription from the list of subscriptions managed by this instance if it is associated with a specific CallId. |
static boolean |
sendNotImplementedResponse(ProtocolProviderServiceSipImpl provider,
javax.sip.RequestEvent requestEvent)
Sends a Response.NOT_IMPLEMENTED Response to a specific
Request. |
| Methods inherited from class net.java.sip.communicator.impl.protocol.sip.MethodProcessorAdapter |
|---|
processDialogTerminated, processIOException, processRequest, processResponse, processTimeout, processTransactionTerminated |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String contentSubType
protected final String eventPackage
protected final ProtocolProviderServiceSipImpl protocolProvider
ProtocolProviderService implementation for which
this instance provides support for a specific event package.
protected final int subscriptionDuration
protected final TimerScheduler timer
Timer support which executes the time-based tasks of
this instance.
| Constructor Detail |
|---|
protected EventPackageSupport(ProtocolProviderServiceSipImpl protocolProvider,
String eventPackage,
int subscriptionDuration,
String contentSubType,
TimerScheduler timer)
EventPackageSupport instance which is to
provide support according to RFC 3265 to a specific SIP
ProtocolProviderService implementation for a specific event
package.
protocolProvider - the SIP ProtocolProviderService implementation
for which the new instance is to provide support for a
specific event packageeventPackage - the name of the event package the new instance is to implement
and carry in the Event and Allow-Events headerssubscriptionDuration - the duration of each subscription to be managed by the new
instance and to be carried in the Expires headers. Subscribers
will interpret it as the value to be announced in the SIP
signaling related to SUBSCRIBE requests originating from them,
notifiers will use it as the default value for SUBSCRIBE
requests coming to them which do not specify an explicit value
in the Expires headers.contentSubType - the sub-type of the content type of the response bodies to be
announced, expected and supported by the
subscriptions/notifications to be managed by the new instancetimer - the Timer support which is to execute the
time-based tasks of the new instance| Method Detail |
|---|
protected void addSubscription(String callId,
EventPackageSupport.Subscription subscription)
callId - the CallId associated with the Subscription to be
addedsubscription - the Subscription to be added to the list of
subscriptions managed by this instancepublic final String getEventPackage()
static javax.sip.ServerTransaction getOrCreateServerTransaction(javax.sip.RequestEvent requestEvent)
ServerTransaction associated with a
specific RequestEvent or creates a new one if the specified
RequestEvent is not associated with one. Does not throw
TransactionAlreadyExistsException and
TransactionUnavailableException but rather logs these
exceptions if they occur and returns null.
requestEvent - the RequestEvent to get the associated
ServerTransaction of
ServerTransaction carried by the specified
RequestEvent if the carried value in question is not
null; a new ServerTransaction initializes
with the Request carried by the specified
RequestEvent if the event in question carries a
null ServerTransaction; null in
case of an exception
protected EventPackageSupport.Subscription getSubscription(javax.sip.address.Address toAddress,
String eventId)
toAddress - the subscription Address/Request URI of the
Subscription to be retrievedeventId - the id tag placed in the Event header of the
Subscription to be retrieved if there is one or null if
the Subscription should have no id tag in its Event header
protected EventPackageSupport.Subscription getSubscription(String callId)
callId - the CallId associated with the Subscription to be
retrieved
protected EventPackageSupport.Subscription[] getSubscriptions()
protected void processAuthenticationChallenge(javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response response,
javax.sip.SipProvider jainSipProvider)
throws OperationFailedException
Request within a specific
ClientTransaction with the proper authorization headers.
clientTransaction - the ClientTransaction which was challenged to
authenticateresponse - the challenging ResponsejainSipProvider - the provider which received the authentication challenge
OperationFailedException - if processing the authentication challenge failed
static void processAuthenticationChallenge(ProtocolProviderServiceSipImpl protocolProvider,
javax.sip.ClientTransaction clientTransaction,
javax.sip.message.Response response,
javax.sip.SipProvider jainSipProvider)
throws OperationFailedException
Request within a specific
ClientTransaction with the proper authorization headers.
protocolProvider - the SIP ProtocolProviderService implementation
which received the authentication challenge and which is to
re-generate and send the respective RequestclientTransaction - the ClientTransaction which was challenged to
authenticateresponse - the challenging ResponsejainSipProvider - the provider which received the authentication challenge
OperationFailedException - if processing the authentication challenge failedpublic void removeSubscription(javax.sip.address.Address toAddress)
toAddress - the subscription Address/Request URI of the
Subscription to be removed
public boolean removeSubscription(javax.sip.address.Address toAddress,
String eventId)
toAddress - the subscription Address/Request URI of the
Subscription to be removedeventId - the id tag in the Event header of the
Subscription to be removed; null if the
Subscription should have no id tag in its Event header
protected boolean removeSubscription(String callId,
EventPackageSupport.Subscription subscription)
callId - the CallId which is expected to be associated with the
specified Subscriptionsubscription - the Subscription to be removed from the list
of subscriptions managed by this instance if it is associated with the
specified CallId
public static boolean sendNotImplementedResponse(ProtocolProviderServiceSipImpl provider,
javax.sip.RequestEvent requestEvent)
Response.NOT_IMPLEMENTED Response to a specific
Request.
provider - the ProtocolProviderServiceSipImpl through which
the Response is to be sentrequestEvent - the Request to which the Response
to be sent is to respond
|
Jitsi: the OpenSource Java VoIP and Instant Messaging client. | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||