public interface Subscription
A subscription has 2 connections, one for each end of the subscription. We will refer to these as endA and endB.
Each connection has a kind which is a name used to retrieve a connector from the synch engine. The retrieved connector implements the Connector interface. This connector object can then be used to retrieve a ConnectionInst implementation which uses information stored in a serializable object to obtain connection specific properties such as id and password.
These properties are obtained by presenting the user with a list of required properties and then encrypting and storing the response. The serialized result is stored as a field in the subscription.
Connections are either polling or notify. Polling means that the host will be polled to see if anything has changed. Notify means that the subscription will be activated when the system is notified of a change.
Connections are also resynch only - that is the far end does not support fetching of individual items but must be completely resynched each time, or the support the full synch feature set.
Resynch connections support relatively simple protocols or file synch.
The full feature connections are used for bedework, Exchange etc.
An empty list means exactly that, no skip properties. A null list means the default diff skip list - probably more useful.
| Modifier and Type | Method and Description |
|---|---|
boolean |
changed() |
boolean |
getDeleted() |
org.bedework.synch.wsmessages.SynchDirectionType |
getDirection()
Which way?
|
Connector |
getEndAConn() |
SubscriptionConnectorInfo |
getEndAConnectorInfo() |
ConnectorInstance |
getEndAConnInst() |
Connector |
getEndBConn() |
SubscriptionConnectorInfo |
getEndBConnectorInfo() |
ConnectorInstance |
getEndBConnInst() |
int |
getErrorCt() |
SubscriptionInfo |
getInfo() |
String |
getLastRefresh() |
org.bedework.synch.wsmessages.SynchMasterType |
getMaster() |
boolean |
getMissingTarget() |
Subscription |
getOutstandingSubscription()
An outstanding request that requires an unsubscribe to complete first
|
String |
getOwner()
Owner
|
String |
getSubscriptionId()
Our generated subscriptionId.
|
Date |
nextRefresh()
Get a next refresh date based on the last refresh value
|
boolean |
polling() |
long |
refreshDelay() |
void |
resetChanged()
reset the changed flag.
|
void |
setDeleted(boolean val) |
void |
setDirection(org.bedework.synch.wsmessages.SynchDirectionType val) |
void |
setEndAConn(Connector val) |
void |
setEndAConnectorInfo(SubscriptionConnectorInfo val)
Info for the endA connector.
|
void |
setEndAConnInst(ConnectorInstance val) |
void |
setEndBConn(Connector val) |
void |
setEndBConnectorInfo(SubscriptionConnectorInfo val)
Info for the endB connector.
|
void |
setEndBConnInst(ConnectorInstance val) |
void |
setErrorCt(int val) |
void |
setInfo(SubscriptionInfo val)
Info for the subscription.
|
void |
setLastRefresh(String val) |
void |
setMaster(org.bedework.synch.wsmessages.SynchMasterType val) |
void |
setMissingTarget(boolean val) |
void |
setOutstandingSubscription(Subscription val)
An outstanding request that requires an unsubscribe to complete first
|
void |
setOwner(String val)
The owner.
|
void |
setSubscriptionId(String val)
Our generated subscriptionId.
|
void |
updateLastRefresh()
Set the lastRefresh from the current time
|
void setSubscriptionId(String val)
val - StringString getSubscriptionId()
void setLastRefresh(String val)
val - A UTC dtstamp valueString getLastRefresh()
void setErrorCt(int val)
val - int consecutive errorsint getErrorCt()
void setMissingTarget(boolean val)
val - True if either target is missingboolean getMissingTarget()
void setOwner(String val)
Interactions with the end points use information contained within the subscription.
val - StringString getOwner()
void setEndAConnectorInfo(SubscriptionConnectorInfo val)
val - SubscriptionConnectorInfoSubscriptionConnectorInfo getEndAConnectorInfo()
void setEndBConnectorInfo(SubscriptionConnectorInfo val)
val - SubscriptionConnectorInfoSubscriptionConnectorInfo getEndBConnectorInfo()
void setInfo(SubscriptionInfo val)
val - SubscriptionInfoSubscriptionInfo getInfo()
void setDirection(org.bedework.synch.wsmessages.SynchDirectionType val)
val - Which way?org.bedework.synch.wsmessages.SynchDirectionType getDirection()
void setMaster(org.bedework.synch.wsmessages.SynchMasterType val)
val - Which end is master?org.bedework.synch.wsmessages.SynchMasterType getMaster()
void setOutstandingSubscription(Subscription val)
val - SubscriptionSubscription getOutstandingSubscription()
void setDeleted(boolean val)
val - True if subscription deletedboolean getDeleted()
void setEndAConn(Connector val)
val - a connectionConnector getEndAConn()
void setEndBConn(Connector val)
val - a connectionConnector getEndBConn()
void setEndAConnInst(ConnectorInstance val)
val - a connection instanceConnectorInstance getEndAConnInst()
void setEndBConnInst(ConnectorInstance val)
val - a connection instanceConnectorInstance getEndBConnInst()
boolean changed()
void resetChanged()
boolean polling()
long refreshDelay()
throws SynchException
SynchException - on properties errorvoid updateLastRefresh()
Date nextRefresh() throws SynchException
SynchException - on properties errorCopyright © 2018 Bedework. All rights reserved.