Interface APIConfiguration
-
- All Known Implementing Classes:
APIConfigurationImpl
public interface APIConfiguration
Interface to show the configuration properties from both the SPI/API based on theConnector
makeup. Before this is passed into theConnectorFacadeFactory
one must callgetConfigurationProperties()
and configure accordingly.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigurationProperties
getConfigurationProperties()
Gets instance of the configuration properties.ObjectPoolConfiguration
getConnectorPoolConfiguration()
Gets the connector pooling configuration.int
getProducerBufferSize()
Get the size of the buffer.ResultsHandlerConfiguration
getResultsHandlerConfiguration()
Get the configuration of the ResultsHandler chain of the Search operation.Set<Class<? extends APIOperation>>
getSupportedOperations()
Get the set of operations that thisConnectorFacade
will support.int
getTimeout(Class<? extends APIOperation> operation)
Gets the timeout in milliseconds based on the operation provided.boolean
isConnectorPoolingSupported()
Determines if thisConnector
uses the framework's connector pooling.void
setInstanceName(String instanceName)
Set name of the instance that this facade represents.void
setProducerBufferSize(int size)
void
setTimeout(Class<? extends APIOperation> operation, int timeout)
Sets the timeout value for the operation provided.
-
-
-
Method Detail
-
getConfigurationProperties
ConfigurationProperties getConfigurationProperties()
Gets instance of the configuration properties. These are initialized to their default values based on meta information. Caller can then modify the properties as needed.
-
isConnectorPoolingSupported
boolean isConnectorPoolingSupported()
Determines if thisConnector
uses the framework's connector pooling.- Returns:
- true if the
Connector
uses the framework's connector pooling feature.
-
getConnectorPoolConfiguration
ObjectPoolConfiguration getConnectorPoolConfiguration()
Gets the connector pooling configuration. This is initialized to the default values. Caller can then modify the properties as needed.
-
getSupportedOperations
Set<Class<? extends APIOperation>> getSupportedOperations()
Get the set of operations that thisConnectorFacade
will support.
-
setTimeout
void setTimeout(Class<? extends APIOperation> operation, int timeout)
Sets the timeout value for the operation provided.- Parameters:
operation
- particular operation that requires a timeout.timeout
- milliseconds that the operation will wait in order to complete. Values less than or equal to zero are considered to disable the timeout property.
-
getTimeout
int getTimeout(Class<? extends APIOperation> operation)
Gets the timeout in milliseconds based on the operation provided.- Parameters:
operation
- particular operation to get a timeout for.- Returns:
- milliseconds to wait for an operation to complete before throwing an error.
-
setProducerBufferSize
void setProducerBufferSize(int size)
Sets the size of the buffer forConnector
the supportSearchOp
and what the results of the producer buffered.- Parameters:
size
- default is 100, if size is set to zero or less will disable buffering.
-
getProducerBufferSize
int getProducerBufferSize()
Get the size of the buffer.
-
getResultsHandlerConfiguration
ResultsHandlerConfiguration getResultsHandlerConfiguration()
Get the configuration of the ResultsHandler chain of the Search operation.
-
setInstanceName
void setInstanceName(String instanceName)
Set name of the instance that this facade represents. The name should represent the system that the connector connects to. This is also known as "resource" name, "connector instance" name, "target system" name, etc. The name will be used mostly for diagnostic purposes, e.g. it will may be included in log messages to distinguish individual instances of the same connector.- Parameters:
instanceName
- Name of the instance that this facade represents.- Since:
- 1.5.0.0
-
-