Package com.boomi.connector.ws
Class WSConnector
- java.lang.Object
-
- com.boomi.connector.util.BaseConnector
-
- com.boomi.connector.ws.WSConnector
-
- All Implemented Interfaces:
Connector,NetworkAuthenticatorConnector,ConnectorCacheFactory<WSCache.Key,WSCache,BrowseContext>
public class WSConnector extends BaseConnector implements ConnectorCacheFactory<WSCache.Key,WSCache,BrowseContext>, NetworkAuthenticatorConnector
A simple implementation of a Connector for the web service connector. The connector acts as the "factory" for most of the other classes in the web service connector implementation. To use custom classes, simply extend this connector and override the relevant create method. As noted in the sdk documentation, the Connector must be thread-safe, and should not be managing account specific information.
-
-
Constructor Summary
Constructors Constructor Description WSConnector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NetworkAuthenticatorcreateAuthenticator(BrowseContext context)Factory method to create a newNetworkAuthenticatorinstance based on the currentBrowseContext.BrowsercreateBrowser(BrowseContext context)Returns an instance of WSBrowser for executing web service browsing.WSCachecreateCache(WSCache.Key key, BrowseContext context)Returns an instance of WSCache for use across multiple connections to the same web service for the same account.WSCache.KeycreateCacheKey(WSConnection<? extends BrowseContext> connection)Returns an instance of WSCache.Key created using the results ofWSConnection.getUrl()andWSConnection.getUsername().<C extends BrowseContext>
WSConnection<C>createConnection(C context)Returns an instance of WSConnection for use by various classes in this connector implementation to handle some of the common functionality of interacting with the web service on a per-context basis.protected OperationcreateExecuteOperation(OperationContext context)Returns an instance of WSExecuteOperation for handlingOperationType.EXECUTEoperations.-
Methods inherited from class com.boomi.connector.util.BaseConnector
createCreateOperation, createDeleteOperation, createGetOperation, createOperation, createQueryOperation, createUpdateOperation, createUpsertOperation, getContext, initialize, setContext
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.boomi.connector.api.Connector
createOperation, initialize
-
-
-
-
Field Detail
-
LOG
public static final Logger LOG
-
-
Method Detail
-
createBrowser
public Browser createBrowser(BrowseContext context)
Returns an instance of WSBrowser for executing web service browsing.- Specified by:
createBrowserin interfaceConnector- Overrides:
createBrowserin classBaseConnector- Parameters:
context- the context for this browse operation. this context is considered to be owned by the Browser after this call and may be held by the Browser for use in subsequent method calls.- Returns:
- a Browser for use when browsing this connector
-
createExecuteOperation
protected Operation createExecuteOperation(OperationContext context)
Returns an instance of WSExecuteOperation for handlingOperationType.EXECUTEoperations.- Overrides:
createExecuteOperationin classBaseConnector- Parameters:
context- the new operation's context- Returns:
- a valid operation
-
createConnection
public <C extends BrowseContext> WSConnection<C> createConnection(C context)
Returns an instance of WSConnection for use by various classes in this connector implementation to handle some of the common functionality of interacting with the web service on a per-context basis.
-
createCacheKey
public WSCache.Key createCacheKey(WSConnection<? extends BrowseContext> connection)
Returns an instance of WSCache.Key created using the results ofWSConnection.getUrl()andWSConnection.getUsername(). The cache key instance controls how data is shared among multiple connections being used in the same container by the same account.
-
createCache
public WSCache createCache(WSCache.Key key, BrowseContext context)
Returns an instance of WSCache for use across multiple connections to the same web service for the same account. The given BrowseContext may be used to establish the cache, but should not be held by the cache instance as it may live longer than the current connection (to which the given context is tied).- Specified by:
createCachein interfaceConnectorCacheFactory<WSCache.Key,WSCache,BrowseContext>- Parameters:
key- the key by which this ConnectorCache will be cached in the connector cachecontext- the current connector context. Note, this context should not be held by the ConnectorCache instance, but may be used to retrieve connection properties.- Returns:
- a valid ConnectorCache instance
-
createAuthenticator
public NetworkAuthenticator createAuthenticator(BrowseContext context)
Description copied from interface:NetworkAuthenticatorConnectorFactory method to create a newNetworkAuthenticatorinstance based on the currentBrowseContext. Implementing classes may return null if no network authentication is necessary. Non-null instances returned by this factory will be used to obtain authentication for a network connection.- Specified by:
createAuthenticatorin interfaceNetworkAuthenticatorConnector- Parameters:
context- BrowserContext with connection and operation configuration- Returns:
- new
NetworkAuthenticatorinstance, null if this feature is not currently used for specific connection settings
-
-