C - N - public interface Connector<C extends ConnectorInstance,N extends Notification,Tconf extends ConnectorConfigI>
The connector instance carries out global initialization and provides ConnectorInstance objects per subscription.
There is only one instance of each kind of connector with a particular configuration. This connector is called to obtain a ConnectorInstance which carries out the actual operations for a given subscription.
| Modifier and Type | Interface and Description |
|---|---|
static class |
Connector.NotificationBatch<N extends Notification>
Far end may send a batch of notifications.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getCallbackUri() |
C |
getConnectorInstance(Subscription sub,
org.bedework.synch.wsmessages.SynchEndType end)
Called to obtain a connector instance for a subscription.
|
ietf.params.xml.ns.icalendar_2.ObjectFactory |
getIcalObjectFactory() |
String |
getId() |
SynchDefs.SynchKind |
getKind() |
PropertiesInfo |
getPropertyInfo()
Information about properties required for subscriptions via this
connector.
|
List<Object> |
getSkipList() |
String |
getStatus() |
SynchEngine |
getSyncher() |
boolean |
getTrustLastmod()
Can we trust the lastmod from this connector?
|
Connector.NotificationBatch<N> |
handleCallback(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp,
List<String> resourceUri)
Will create a notification batch object which will be passed to a synchling for
processing.
|
boolean |
isFailed() |
boolean |
isManager() |
boolean |
isReadOnly()
Is this a read-only connector?
|
boolean |
isStarted() |
boolean |
isStopped() |
void |
respondCallback(javax.servlet.http.HttpServletResponse resp,
Connector.NotificationBatch<N> notifications)
Will respond to a notification.
|
void |
start(String connectorId,
Tconf conf,
String callbackUri,
SynchEngine syncher)
Start the connector.
|
void |
stop()
Shut down the connector
|
void start(String connectorId, Tconf conf, String callbackUri, SynchEngine syncher) throws SynchException
The callback url is unique to the connector. It will be used as a path prefix to allow the callback service to locate the handler for incoming callback requests.
For example, if the callback context is /synchcb/ and the connector id is "bedework" then the callback uri might be /synchcb/bedework/. The connector might append a uid to that path to allow it to locate the active subscription for which the callback is intended.
connectorId - - registered id for the connectorconf - callbackUri - syncher - SynchExceptionString getStatus()
boolean isManager()
boolean isStarted()
boolean isFailed()
boolean isStopped()
SynchDefs.SynchKind getKind()
boolean isReadOnly()
boolean getTrustLastmod()
String getId()
String getCallbackUri()
SynchEngine getSyncher()
ietf.params.xml.ns.icalendar_2.ObjectFactory getIcalObjectFactory()
PropertiesInfo getPropertyInfo()
C getConnectorInstance(Subscription sub, org.bedework.synch.wsmessages.SynchEndType end) throws SynchException
sub - - the subscriptionend - - which endSynchExceptionConnector.NotificationBatch<N> handleCallback(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp, List<String> resourceUri) throws SynchException
The resource URI has been stripped of the context element and the element which identifies the connector. What remains is used by the connector to determine a subscription id allowing retrieval of the subscription from the synch engine.
req - resp - resourceUri - - elements of the path with context and connector id removedSynchExceptionvoid respondCallback(javax.servlet.http.HttpServletResponse resp,
Connector.NotificationBatch<N> notifications)
throws SynchException
resp - notifications - from handleCallback.SynchExceptionvoid stop() throws SynchException
SynchExceptionCopyright © 2018 Bedework. All rights reserved.