Package com.bea.wcp.profile
Interface ProfileSubscription
public interface ProfileSubscription
This is a class returned by
ProfileServiceSpi.subscribe.
It is also used by callbacks invoked because of the subscription.- Author:
- Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumPENDING means the subscription request has been submitted, and the final state of the subscription is not yet known. -
Method Summary
Modifier and TypeMethodDescriptionvoidcancel()Cancels the subscription.javax.servlet.sip.SipApplicationSessionThe SipApplicationSession that was used to register the subscription.The document selector that was used to register the subscription.intReturns the remaining length of this subscription, in secondsgetInfo()The information that was used when registering the subscription.This method indicates the current state of the subscription.voidsetExpires(int seconds) Requests that the subscription expires seconds seconds from now.
-
Method Details
-
getSubscriptionState
ProfileSubscription.ProfileSubscriptionState getSubscriptionState()This method indicates the current state of the subscription.- Returns:
- the subscription state
-
getApplicationSession
javax.servlet.sip.SipApplicationSession getApplicationSession()The SipApplicationSession that was used to register the subscription.- Returns:
- the SipApplicationSession corresponding to this subscription
-
getDocumentSelector
String getDocumentSelector()The document selector that was used to register the subscription.- Returns:
- the document selector corresponding to this subscription
-
getInfo
Serializable getInfo()The information that was used when registering the subscription. The data may have been changed since registration.- Returns:
- the document selector corresponding to this subscription
-
cancel
Cancels the subscription.- Throws:
ProfileException
-
getExpires
int getExpires()Returns the remaining length of this subscription, in seconds. -1 means the subscription has no defined duration.- Returns:
- The length of this subscription in seconds
-
setExpires
Requests that the subscription expires seconds seconds from now. Calling this methods with zero seconds is equivalent to callingcancel().Modifying the length of the subscription may not be possible in all cases. If it is not possible, no exception is thrown; user code interested in this case should catch
SubscriptionModificationFailedException, a subclass ofProfileException.Note also that in some implementations the update may not be instantaneous. If it is not, the application should wait for an
ProfileListener.modification(ProfileSubscription)call indicating the update was successful.- Parameters:
seconds-- Throws:
ProfileException
-