|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.avis.client.Subscription
public final class Subscription
A subscription to notifications from an Elvin connection.
Elvin.subscribe(String, Keys, SecureMode),
addListener(NotificationListener)| Method Summary | |
|---|---|
boolean |
acceptInsecure()
True if ALLOW_INSECURE_DELIVERY is enabled. |
void |
addListener(NotificationListener listener)
Add a listener for notifications matched by this subscription. |
Elvin |
elvin()
The elvin connection that created this subscription. |
static String |
escapeField(String field)
Escape illegal characters in a field name for use in a subscription expression. |
static String |
escapeString(String string)
Escape illegal characters in a string value for use in a subscription expression. |
boolean |
hasListeners()
True if any listeners are in the listener list. |
boolean |
isActive()
Test if this subscription is still able to receive notifications. |
Keys |
keys()
The keys used to receive secure notifications. |
void |
remove()
Remove this subscription (unsubscribe). |
void |
removeListener(NotificationListener listener)
Remove a previously added listener. |
SecureMode |
secureMode()
The secure mode specified for receipt of notifications. |
void |
setKeys(Keys newKeys)
Change the keys used for receiving secure notifications. |
void |
setSecureMode(SecureMode newMode)
Change the subscription's secure delivery requirement. |
void |
setSubscriptionExpr(String newSubscriptionExpr)
Change the subscription expression. |
String |
subscriptionExpr()
The subscription expression. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void remove()
throws IOException
IOException - if a network error occurs.public Elvin elvin()
public boolean isActive()
remove() or when its
underlying connection is closed.
public String subscriptionExpr()
public void setSubscriptionExpr(String newSubscriptionExpr)
throws IOException,
InvalidSubscriptionException
IOException - if the subscription is invalid or if a
network error occurs.
InvalidSubscriptionException - if the subscription expression
is invalid.public SecureMode secureMode()
public void setSecureMode(SecureMode newMode)
throws IOException
newMode - The secure delivery mode.
IOException - if an IO error occurs during the operation.public boolean acceptInsecure()
secureMode()public Keys keys()
public void setKeys(Keys newKeys)
throws IOException
IOExceptionpublic void addListener(NotificationListener listener)
Elvin.addNotificationListener(GeneralNotificationListener)public void removeListener(NotificationListener listener)
public boolean hasListeners()
addListener(NotificationListener)public static String escapeField(String field)
field - The string to use as a field name.
escapeString(String)public static String escapeString(String string)
string - A string that will occur within single or double
quotes in a subscription expression.
escapeField(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||