Package org.bedework.synch.shared
Interface SynchEngine
-
public interface SynchEngineUser: mike Date: 3/11/18 Time: 00:26
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddSubscription(Subscription sub)Stringdecrypt(String val)voiddeleteSubscription(Subscription sub)Subscriptionfind(Subscription sub)Find any subscription that matches this one.ConnectorgetConnector(String id)Return a registered connector with the given id.Set<String>getConnectorIds()ConnectorInstancegetConnectorInstance(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end)Gets an instance and implants it in the subscription object.List<Stat>getStats()SubscriptiongetSubscription(String id)org.bedework.util.timezones.TimezonesgetTimezones()org.bedework.util.calendar.XcalUtil.TzGettergetTzGetter()voidhandleNotification(Notification<?> note)voidhandleNotifications(Connector.NotificationBatch<Notification> notes)Processes a batch of notifications.voidreschedule(Subscription sub, boolean newSub)Reschedule a subscription for updates.voidrescheduleNow(String id)Reschedule a subscription now.voidsetConnectors(Subscription sub)When we start up a new subscription we implant a Connector in the object.voidstart()Start synch process.voidstop()Stop synch process.booleansubscriptionsOnly()voidupdateSubscription(Subscription sub)
-
-
-
Method Detail
-
getTimezones
org.bedework.util.timezones.Timezones getTimezones()
-
subscriptionsOnly
boolean subscriptionsOnly()
- Returns:
- true if this instance is only handling subscriptions
-
handleNotification
void handleNotification(Notification<?> note)
- Parameters:
note-
-
setConnectors
void setConnectors(Subscription sub) throws SynchException
When we start up a new subscription we implant a Connector in the object.- Parameters:
sub-- Throws:
SynchException
-
rescheduleNow
void rescheduleNow(String id) throws SynchException
Reschedule a subscription now.- Parameters:
id- the subscription id- Throws:
SynchException
-
reschedule
void reschedule(Subscription sub, boolean newSub)
Reschedule a subscription for updates.- Parameters:
sub- the subscriptionnewSub- true for new subscription
-
getConnectorInstance
ConnectorInstance getConnectorInstance(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end) throws SynchException
Gets an instance and implants it in the subscription object.- Parameters:
sub-end-- Returns:
- ConnectorInstance or throws Exception
- Throws:
SynchException
-
addSubscription
void addSubscription(Subscription sub) throws SynchException
- Parameters:
sub-- Throws:
SynchException
-
deleteSubscription
void deleteSubscription(Subscription sub) throws SynchException
- Parameters:
sub-- Throws:
SynchException
-
updateSubscription
void updateSubscription(Subscription sub) throws SynchException
- Parameters:
sub-- Throws:
SynchException
-
getSubscription
Subscription getSubscription(String id) throws SynchException
- Parameters:
id-- Returns:
- subscription
- Throws:
SynchException
-
find
Subscription find(Subscription sub) throws SynchException
Find any subscription that matches this one. There can only be one with the same endpoints- Parameters:
sub-- Returns:
- matching subscriptions
- Throws:
SynchException
-
decrypt
String decrypt(String val) throws SynchException
- Parameters:
val-- Returns:
- decrypted string
- Throws:
SynchException
-
getConnector
Connector getConnector(String id)
Return a registered connector with the given id.- Parameters:
id-- Returns:
- connector or null.
-
handleNotifications
void handleNotifications(Connector.NotificationBatch<Notification> notes) throws SynchException
Processes a batch of notifications. This must be done in a timely manner as a request is usually hanging on this.- Parameters:
notes-- Throws:
SynchException
-
getTzGetter
org.bedework.util.calendar.XcalUtil.TzGetter getTzGetter()
- Returns:
- a getter for timezones
-
start
void start() throws SynchExceptionStart synch process.- Throws:
SynchException
-
stop
void stop()
Stop synch process.
-
-