org.exolab.jms.net.connector
Interface ConnectionFactory

All Known Implementing Classes:
AbstractConnectionManager, AbstractConnectionFactory

public interface ConnectionFactory

A factory for establishing connections, and accepting them.

Version:
$Revision: 1.3 $ $Date: 2005/05/03 13:45:58 $
Author:
Tim Anderson

Method Summary
 void accept(URI uri)
          Listen for new connections on the specified URI, using the default connection acceptor properties.
 void accept(URI uri, java.util.Map properties)
          Listen for new connections on the specified URI, using the specified acceptor properties
 boolean canAccept(URI uri)
          Determines if this factory supports listening for new connections on the specified URI.
 boolean canConnect(URI uri)
          Determines if this factory supports connections to the specified URI.
 Connection getConnection(java.security.Principal principal, URI uri)
          Returns a connection to the specified URI, using the default connection properties.
 Connection getConnection(java.security.Principal principal, URI uri, java.util.Map properties)
          Returns a connection to the specified URI, using the specified connection properties.
 

Method Detail

canConnect

public boolean canConnect(URI uri)
Determines if this factory supports connections to the specified URI.
Parameters:
uri - the connection address
Returns:
true if this factory supports the URI; false otherwise

getConnection

public Connection getConnection(java.security.Principal principal,
                                URI uri)
                         throws ResourceException
Returns a connection to the specified URI, using the default connection properties.
Parameters:
principal - the security principal. May be null
uri - the connection address
Returns:
a connection to uri
Throws:
ResourceException - if a connection cannot be established

getConnection

public Connection getConnection(java.security.Principal principal,
                                URI uri,
                                java.util.Map properties)
                         throws ResourceException
Returns a connection to the specified URI, using the specified connection properties.
Parameters:
principal - the security principal. May be null
uri - the connection address
properties - connection properties. If null, use the default connection properties
Returns:
a connection to uri
Throws:
ResourceException - if a connection cannot be established

canAccept

public boolean canAccept(URI uri)
Determines if this factory supports listening for new connections on the specified URI.
Parameters:
uri - the connection address
Returns:
true if this factory supports the URI; false otherwise

accept

public void accept(URI uri)
            throws ResourceException
Listen for new connections on the specified URI, using the default connection acceptor properties.
Parameters:
uri - the connection address
Throws:
ResourceException - if connections can't be accepted on the specified URI

accept

public void accept(URI uri,
                   java.util.Map properties)
            throws ResourceException
Listen for new connections on the specified URI, using the specified acceptor properties
Parameters:
uri - the connection address
properties - acceptor properties. May be null
Throws:
ResourceException - if connections can't be accepted on the specified URI


Copyright © 1999-2007 The OpenJMS Group. All Rights Reserved.