public abstract class ConnectorBase extends Connector
| Modifier and Type | Class and Description |
|---|---|
protected class |
ConnectorBase.ProtectedConnection
ProtectedConnection provides a subclass to Connection in order to extract protected values from the
connection in order to supply them to the Connector implementation.
|
| Modifier and Type | Field and Description |
|---|---|
protected ConnectedAssetProperties |
connectedAssetProperties |
protected Connection |
connectionBean |
protected ConnectionProperties |
connectionProperties |
protected String |
connectorInstanceId |
protected boolean |
isActive |
protected Map<String,Object> |
securedProperties |
| Constructor and Description |
|---|
ConnectorBase()
Typical Constructor: Connectors should always have a constructor requiring no parameters and perform
initialization in the initialize method.
|
| Modifier and Type | Method and Description |
|---|---|
void |
disconnect()
Free up any resources held since the connector is no longer needed.
|
boolean |
equals(Object object)
Provide a common implementation of equals for all OCF Connector Provider objects.
|
ConnectedAssetProperties |
getConnectedAssetProperties(String userId)
Returns the properties that contain the metadata for the asset.
|
ConnectionProperties |
getConnection()
Returns the connection object that was used to create the connector instance.
|
String |
getConnectorInstanceId()
Returns the unique connector instance id that assigned to the connector instance when it was created.
|
int |
hashCode()
Provide a common implementation of hashCode for all OCF Connector objects.
|
void |
initialize(String connectorInstanceId,
ConnectionProperties connectionProperties)
Call made by the ConnectorProvider to initialize the Connector with the base services.
|
void |
initializeConnectedAssetProperties(ConnectedAssetProperties connectedAssetProperties)
Set up the connected asset properties object.
|
boolean |
isActive()
Return a flag indicating whether the connector is active.
|
void |
start()
Indicates that the connector is completely configured and can begin processing.
|
String |
toString()
Standard toString method.
|
protected String connectorInstanceId
protected ConnectionProperties connectionProperties
protected Connection connectionBean
protected ConnectedAssetProperties connectedAssetProperties
protected boolean isActive
public ConnectorBase()
public void initialize(String connectorInstanceId, ConnectionProperties connectionProperties)
initialize in class ConnectorconnectorInstanceId - unique id for the connector instance useful for messages etcconnectionProperties - POJO for the configuration used to create the connector.public String getConnectorInstanceId()
getConnectorInstanceId in class Connectorpublic ConnectionProperties getConnection()
getConnection in class Connectorpublic void initializeConnectedAssetProperties(ConnectedAssetProperties connectedAssetProperties)
initializeConnectedAssetProperties in class ConnectorconnectedAssetProperties - properties of the connected assetpublic ConnectedAssetProperties getConnectedAssetProperties(String userId) throws PropertyServerException, UserNotAuthorizedException
getConnectedAssetProperties in class ConnectoruserId - userId of requesting userPropertyServerException - indicates a problem retrieving properties from a metadata repositoryUserNotAuthorizedException - indicates that the user is not authorized to access the asset properties.public void start()
throws ConnectorCheckedException
start in class ConnectorConnectorCheckedException - there is a problem within the connector.public void disconnect()
throws ConnectorCheckedException
disconnect in class ConnectorConnectorCheckedException - there is a problem within the connector.public boolean isActive()
public int hashCode()
public boolean equals(Object object)
Copyright © 2018–2020 ODPi. All rights reserved.