org.n52.connectors.core
Interface Connector

All Known Implementing Classes:
AbstractConnector

public interface Connector

A connector is a support class that is needed to contain all administrative information that is needed to access service providers. It is able to initialize and retrieve/create objects that give access to a service provider

Author:
martin schouwenburg

Method Summary
 void factorySideInitialization(org.w3c.dom.Document xmlConfiguration, ConnectorRequest request)
          Initializes the connector with information contained in the request.
 java.lang.Object getImplementingObject(ConnectorRequest req)
          Returns an object that supports the desired functionality or gives (indirectly)access to the desired functionality.
 org.geotools.metadata.iso.MetadataEntity getMetadata(java.lang.String s)
           
 java.lang.String getName()
          access to the name field of a connector
 boolean isSupported(ConnectorRequest request)
          Checks if a connector supports a service provider that fullfills the conditions set in the request.
 java.lang.String registrySideInitialization(ConnectorRequest request)
          Creates an Xml string that contains initialization inforamtion needed by the factory to properly created the connector implied by the request.
 

Method Detail

getMetadata

org.geotools.metadata.iso.MetadataEntity getMetadata(java.lang.String s)
Parameters:
s - a metadata identifier based on ISO 19115. see..
Returns:
returns a metadataentity based on geotools (ISO 19115)

isSupported

boolean isSupported(ConnectorRequest request)
Checks if a connector supports a service provider that fullfills the conditions set in the request.

Parameters:
request - contains all information that is needed to find a suitable connector
Returns:
true if the information in the request matches with the properties of this connector

factorySideInitialization

void factorySideInitialization(org.w3c.dom.Document xmlConfiguration,
                               ConnectorRequest request)
                               throws N52Exception
Initializes the connector with information contained in the request. This initialization happens at the client side (factory) with parameters that do not need to be send to the registry. The method also ensures that initialization information send by the registry to the factory is properly used to initialize the connector This methode can be overruled in an appropraite connector

Parameters:
xmlConfiguration - xml DOM document containing the information returned by the registry
request - The original request may contain initialization information used as the client side
Throws:
IllegalConnectorRequest - requested parameters where not present or invalid in the request
ParameterDoesNotExist
N52Exception

registrySideInitialization

java.lang.String registrySideInitialization(ConnectorRequest request)
Creates an Xml string that contains initialization inforamtion needed by the factory to properly created the connector implied by the request. This initialization happens at the server side (registry) with parameters that are only present at the server side. This methode can be overruled in an appropraite connector

Parameters:
request - The original request may contain information that is needed by the server side to create extra initialization information
Throws:
IllegalConnectorRequest - requested parameters where not present or invalid in the request

getName

java.lang.String getName()
access to the name field of a connector

Returns:
a name of the connector

getImplementingObject

java.lang.Object getImplementingObject(ConnectorRequest req)
                                       throws N52Exception
Returns an object that supports the desired functionality or gives (indirectly)access to the desired functionality.

Parameters:
req -
Returns:
Throws:
N52Exception