org.n52.connectors.core
Class ServiceFactory
java.lang.Object
org.n52.connectors.core.AbstractServiceFactory
org.n52.connectors.core.ServiceFactory
- All Implemented Interfaces:
- ConnectorCreation
public class ServiceFactory
- extends AbstractServiceFactory
Implements the abstract factory. The factory is the main interface for
non-applet applications to access functionality provided by the connector
system AbstractFactory
. A user of a factory formulates a request and
will get back a connector which supports the request.
- Author:
- martin schouwenburg
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServiceFactory
public ServiceFactory()
getConnector
Connector getConnector(ServiceRequest request)
throws org.n52.connectors.core.exceptions.N52Exception
- Retrieves a connector that can retrieve and initialize an object that
supports the requested functionality
- Parameters:
request
-
- Returns:
-
- Throws:
org.n52.connectors.core.exceptions.N52Exception
getNodeValue
public static java.lang.String getNodeValue(org.w3c.dom.Node n,
java.lang.String tag)
throws javax.xml.transform.TransformerException
- Throws:
javax.xml.transform.TransformerException
getServiceAdapter
public java.lang.Object getServiceAdapter(ServiceRequest request)
throws org.n52.connectors.core.exceptions.N52Exception
- Description copied from interface:
ConnectorCreation
- return one object which supports an interface with requested
functionality. If more than one is found the first one will be returned.
To be usable a object must be cast to the functionality interface it
supports.
- Parameters:
request
- contains all information that is needed to find a suitable
connector
- Returns:
- a object that supports the request
- Throws:
org.n52.connectors.core.exceptions.IllegalConnectorRequestException
- request could not be fullfilled
org.n52.connectors.core.exceptions.N52Exception
- low level errors that are passed to higher level error
handling
getServiceAdapters
public java.lang.Object[] getServiceAdapters(ServiceRequest request)
- Description copied from interface:
ConnectorCreation
- returns one or more objects which supports an interface with requested
functionality
- Parameters:
request
- contains all information that is needed to find a suitable
connector
- Returns:
- a set of objects that all supports the request