public class NotificationSystem extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
protected long |
maxSubscriptionLength |
protected org.apache.muse.ws.addressing.EndpointReference |
producerEPR |
protected ISubscriptionDB |
subscriptionDB |
protected int |
timeBetweenRetries |
static int |
UNLIMITED_DURATION |
protected static String |
wsnUri |
Constructor and Description |
---|
NotificationSystem(String endpointURI,
ISubscriptionDB subscriptionDB) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.muse.ws.addressing.EndpointReference |
createSubscriptionReference(String subUUID) |
void |
dispatchMessage(QName topic,
Element messageElt) |
long |
getMaxSubscriptionLength() |
int |
getTimeBetweenRetries() |
Element |
renew(String subUUID,
Element requestElt) |
void |
setMaxSubscriptionLength(long subscriptionLength)
Sets the initial duration of all subscriptions after which they are removed from the DB.
|
void |
setTimeBetweenRetries(int timeBetweenRetries)
Sets the time to wait between two successive retries
|
Element |
subscribe(Element requestElt)
Call this method with the content of the Subscribe message received by the service.
|
Element |
unsubscribe(String subUUID,
Element requestElt) |
public static int UNLIMITED_DURATION
protected static String wsnUri
protected static org.slf4j.Logger log
protected ISubscriptionDB subscriptionDB
protected org.apache.muse.ws.addressing.EndpointReference producerEPR
protected long maxSubscriptionLength
protected int timeBetweenRetries
public NotificationSystem(String endpointURI, ISubscriptionDB subscriptionDB)
public long getMaxSubscriptionLength()
public void setMaxSubscriptionLength(long subscriptionLength)
subscriptionLength
- max subscription duration in seconds. Use the UNLIMITED_DURATION constant for unlimited duration.public int getTimeBetweenRetries()
public void setTimeBetweenRetries(int timeBetweenRetries)
timeBetweenRetries
- public Element subscribe(Element requestElt) throws Exception
requestElt
- Exception
public Element unsubscribe(String subUUID, Element requestElt) throws Exception
Exception
protected org.apache.muse.ws.addressing.EndpointReference createSubscriptionReference(String subUUID)
Copyright © 2016 Sensia Software LLC. All rights reserved.