public class WSConnector extends BaseConnector implements ConnectorCacheFactory<WSCache.Key,WSCache,BrowseContext>, NetworkAuthenticatorConnector
Constructor and Description |
---|
WSConnector() |
Modifier and Type | Method and Description |
---|---|
NetworkAuthenticator |
createAuthenticator(BrowseContext context)
Factory method to create a new
NetworkAuthenticator instance based on the current BrowseContext . |
Browser |
createBrowser(BrowseContext context)
Returns an instance of WSBrowser for executing web service browsing.
|
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.
|
WSCache.Key |
createCacheKey(WSConnection<? extends BrowseContext> connection)
Returns an instance of WSCache.Key created using the results of
WSConnection.getUrl() and
WSConnection.getUsername() . |
<C extends BrowseContext> |
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 Operation |
createExecuteOperation(OperationContext context)
Returns an instance of WSExecuteOperation for handling
OperationType.EXECUTE
operations. |
createCreateOperation, createDeleteOperation, createGetOperation, createOperation, createQueryOperation, createUpdateOperation, createUpsertOperation, getContext, initialize, setContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createOperation, initialize
public static final Logger LOG
public Browser createBrowser(BrowseContext context)
createBrowser
in interface Connector
createBrowser
in class BaseConnector
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.protected Operation createExecuteOperation(OperationContext context)
OperationType.EXECUTE
operations.createExecuteOperation
in class BaseConnector
context
- the new operation's contextpublic <C extends BrowseContext> WSConnection<C> createConnection(C context)
public WSCache.Key createCacheKey(WSConnection<? extends BrowseContext> connection)
WSConnection.getUrl()
and
WSConnection.getUsername()
. The cache key instance controls how data is shared among multiple connections
being used in the same container by the same account.public WSCache createCache(WSCache.Key key, BrowseContext context)
createCache
in interface ConnectorCacheFactory<WSCache.Key,WSCache,BrowseContext>
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.public NetworkAuthenticator createAuthenticator(BrowseContext context)
NetworkAuthenticatorConnector
NetworkAuthenticator
instance based on the current BrowseContext
.
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.createAuthenticator
in interface NetworkAuthenticatorConnector
context
- BrowserContext with connection and operation configurationNetworkAuthenticator
instance, null if this feature is not currently used for specific
connection settings