Openwings API Documentation (v1.1)

net.openwings.connector
Interface ConnectorLoader


public interface ConnectorLoader

This interface describes a utility that loads asynchronous and synchronous connectors. An implementation of this interface is obtained using the ConnectorLoaderFactory.


Method Summary
 Connector getConnector(java.lang.Class serviceInterface, java.lang.Class connectorInterface)
          This method instantiates and returns a connector for the given interface.
 Connector getConnector(java.lang.Class serviceInterface, java.lang.Class connectorInterface, java.lang.ClassLoader classLoader)
          This method attempts to use the given ClassLoader to instantiate a connector for the given interface.
 

Method Detail

getConnector

public Connector getConnector(java.lang.Class serviceInterface,
                              java.lang.Class connectorInterface)
This method instantiates and returns a connector for the given interface.

Parameters:
serviceInterface - Interface for which a connector is to be retrieved
connectorInterface - subtype of connector that is requested for example, net.openwings.connector.synchronous.SynchronousConnector or net.openwings.connector.asynchronous.AsynchronousConnector

getConnector

public Connector getConnector(java.lang.Class serviceInterface,
                              java.lang.Class connectorInterface,
                              java.lang.ClassLoader classLoader)
This method attempts to use the given ClassLoader to instantiate a connector for the given interface.

Parameters:
serviceInterface - Interface for which a connector is to be retrieved
connectorInterface - subtype of connector that is requested for example, net.openwings.connector.synchronous.SynchronousConnector or net.openwings.connector.asynchronous.AsynchronousConnector
classLoader - ClassLoader to use to obtain the Class of the connector implementation

Openwings API Documentation (v1.1)