org.exolab.core.messenger
Interface Connector

All Known Implementing Classes:
TcpConnector

public interface Connector

A Connector is a factory for Connection and ManagedConnectionAcceptor objects, for a specific communications protocol.

Version:
$Revision: 1.4 $ $Date: 2002/02/21 09:49:41 $
Author:
Tim Anderson
See Also:
Connection, ConnectionAcceptor, Messenger

Method Summary
 Connection getConnection(java.lang.String uri, ConnectionProperties properties)
          Returns a connection for the specified URI and connection properties
 ManagedConnectionAcceptor getManagedConnectionAcceptor(java.lang.String uri, ConnectionProperties properties)
          Returns a connection acceptor for the specified URI and connection properties
 java.lang.String getScheme()
          Returns the protocol that the connector supports
 

Method Detail

getConnection

Connection getConnection(java.lang.String uri,
                         ConnectionProperties properties)
                         throws java.net.MalformedURLException,
                                java.rmi.RemoteException
Returns a connection for the specified URI and connection properties

Parameters:
uri - the connection address
properties - connection properties (may be null)
Returns:
a Connection if the connector finds an acceptable match, otherwise null
Throws:
java.net.MalformedURLException - if uri is an invalid URI
java.rmi.RemoteException - if a connection cannot be established
java.lang.IllegalArgumentException - if uri is null

getManagedConnectionAcceptor

ManagedConnectionAcceptor getManagedConnectionAcceptor(java.lang.String uri,
                                                       ConnectionProperties properties)
                                                       throws java.net.MalformedURLException,
                                                              java.rmi.RemoteException
Returns a connection acceptor for the specified URI and connection properties

Parameters:
uri - the address to accept connections on
properties - connection properties (may be null)
Returns:
a connection acceptor, for accepting connection requests on the specified URI
Throws:
java.net.MalformedURLException - if uri is an invalid URI
java.rmi.RemoteException - if an I/O error occurs
java.lang.IllegalArgumentException - if uri is null

getScheme

java.lang.String getScheme()
Returns the protocol that the connector supports

Returns:
the protocol that the connector supports


Copyright © 1999-2012 The Exolab Group. All Rights Reserved.