|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.exolab.jms.net.connector.AbstractConnectionFactory
Abstract implementation of the ConnectionFactory
interface.
Field Summary | |
static java.lang.String |
PROPERTY_PREFIX
Connection property prefix. |
Constructor Summary | |
AbstractConnectionFactory(java.lang.String scheme,
ManagedConnectionFactory factory,
ConnectionManager manager)
Construct a new AbstractConnectionFactory . |
|
AbstractConnectionFactory(java.lang.String connectScheme,
java.lang.String acceptScheme,
ManagedConnectionFactory factory,
ConnectionManager manager)
Construct a new AbstractConnectionFactory . |
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. |
protected ConnectionRequestInfo |
getAcceptorRequestInfo(URI uri,
java.util.Map properties)
Returns connection request info for the specified URI and connection acceptor properties. |
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. |
protected ConnectionManager |
getConnectionManager()
Returns the connection manager. |
protected abstract ConnectionRequestInfo |
getConnectionRequestInfo(URI uri,
java.util.Map properties)
Returns connection request info for the specified URI and connection properties. |
protected ManagedConnectionFactory |
getManagedConnectionFactory()
Returns the managed connection factory. |
protected Properties |
getProperties(java.util.Map properties)
Helper to return a Properties instance for the supplied
map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_PREFIX
Constructor Detail |
public AbstractConnectionFactory(java.lang.String scheme, ManagedConnectionFactory factory, ConnectionManager manager)
AbstractConnectionFactory
.scheme
- the scheme that this factory supports, for both connect
and acceptfactory
- the managed connection factorymanager
- the connection managerpublic AbstractConnectionFactory(java.lang.String connectScheme, java.lang.String acceptScheme, ManagedConnectionFactory factory, ConnectionManager manager)
AbstractConnectionFactory
.connectScheme
- the connect scheme that this factory supportsacceptScheme
- the accept scheme that this factory supportsfactory
- the managed connection factorymanager
- the connection managerMethod Detail |
public boolean canConnect(URI uri)
canConnect
in interface ConnectionFactory
uri
- the connection addresstrue
if this factory supports the URI;
false
otherwisepublic Connection getConnection(java.security.Principal principal, URI uri) throws ResourceException
getConnection
in interface ConnectionFactory
principal
- the security principal. May be null
uri
- the connection addressuri
ResourceException
- if a connection cannot be establishedpublic Connection getConnection(java.security.Principal principal, URI uri, java.util.Map properties) throws ResourceException
getConnection
in interface ConnectionFactory
principal
- the security principal. May be null
uri
- the connection addressproperties
- connection properties. If null
, use the
default connection propertiesuri
ResourceException
- if a connection cannot be establishedpublic boolean canAccept(URI uri)
canAccept
in interface ConnectionFactory
uri
- the connection addresstrue
if this factory supports the URI;
false
otherwisepublic void accept(URI uri) throws ResourceException
accept
in interface ConnectionFactory
uri
- the connection addressResourceException
- if connections can't be accepted on the
specified URIpublic void accept(URI uri, java.util.Map properties) throws ResourceException
accept
in interface ConnectionFactory
uri
- the connection addressproperties
- acceptor properties. May be null
ResourceException
- if connections can't be accepted on the
specified URIprotected abstract ConnectionRequestInfo getConnectionRequestInfo(URI uri, java.util.Map properties) throws ResourceException
uri
- the connection addressproperties
- connection properties. If null
, use the
default connection propertiesuri
and
properties
ResourceException
- for any errorprotected ConnectionRequestInfo getAcceptorRequestInfo(URI uri, java.util.Map properties) throws ResourceException
getConnectionRequestInfo(URI, Map)
.uri
- the connection addressproperties
- acceptor properties. May be null
uri
and
properties
ResourceException
- for any errorprotected ManagedConnectionFactory getManagedConnectionFactory()
protected ConnectionManager getConnectionManager()
protected Properties getProperties(java.util.Map properties)
Properties
instance for the supplied
map.
All searches will be performed with properties prefixed by
"org.exolab.jms.net.<scheme>." .
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |