|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jcoderz.commons.connector.ManagedConnectionFactoryBase
public abstract class ManagedConnectionFactoryBase
This class implements the ManagedConnectionFactory
interface and provides a set of abstract methods which have to be overrided
by a derived class to provide the connector specific features.
ManagedConnection,
Serialized Form| Constructor Summary | |
|---|---|
ManagedConnectionFactoryBase()
|
|
| Method Summary | |
|---|---|
Object |
createConnectionFactory()
|
Object |
createConnectionFactory(ConnectionManager cm)
|
protected abstract Object |
createConnectionFactoryImpl(ConnectionManager cm)
Creates a new ConnectionFactory. |
ManagedConnection |
createManagedConnection(Subject subject,
ConnectionRequestInfo cri)
|
protected abstract ManagedConnection |
createManagedConnectionImpl(UserPassword up,
ConnectionRequestInfo cri)
|
boolean |
equals(Object o)
Returns true if this
ManagedConnectionFactoryImpl is the same as the o argument. |
PrintWriter |
getLogWriter()
|
UserPassword |
getUserPassword()
Returns the UserPassword instance, containing the user name and password, set be deployment code. |
int |
hashCode()
|
protected abstract boolean |
isMatchingManagedConnection(ManagedConnection mc,
UserPassword up,
ConnectionRequestInfo cri)
Tests whether the given managed connection mc matchs for
handling the connection allocation request. |
ManagedConnection |
matchManagedConnections(Set set,
Subject subject,
ConnectionRequestInfo cri)
|
void |
setLogWriter(PrintWriter pw)
|
void |
setPassword(String password)
Sets the password for this factory. |
void |
setUserName(String userName)
Sets the user name for this factory. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ManagedConnectionFactoryBase()
| Method Detail |
|---|
protected abstract boolean isMatchingManagedConnection(ManagedConnection mc,
UserPassword up,
ConnectionRequestInfo cri)
throws ResourceException
mc matchs for
handling the connection allocation request.
mc - The managed connection to be tested.up - The caller's security information.cri - A resource adapter specific connection request information.
mc matchs for
handling the connection allocation request. Otherwise false.
ResourceException - thrown in error cases.
protected abstract Object createConnectionFactoryImpl(ConnectionManager cm)
throws ResourceException
cm - The ConnectorManager to use.
ResourceException - thrown in error cases.
protected abstract ManagedConnection createManagedConnectionImpl(UserPassword up,
ConnectionRequestInfo cri)
public ManagedConnection createManagedConnection(Subject subject,
ConnectionRequestInfo cri)
throws ResourceException
createManagedConnection in interface ManagedConnectionFactoryResourceException
public Object createConnectionFactory(ConnectionManager cm)
throws ResourceException
createConnectionFactory in interface ManagedConnectionFactoryResourceException
public Object createConnectionFactory()
throws ResourceException
createConnectionFactory in interface ManagedConnectionFactoryResourceException
public ManagedConnection matchManagedConnections(Set set,
Subject subject,
ConnectionRequestInfo cri)
throws ResourceException
matchManagedConnections in interface ManagedConnectionFactoryResourceException
public void setLogWriter(PrintWriter pw)
throws ResourceException
setLogWriter in interface ManagedConnectionFactoryResourceException
public PrintWriter getLogWriter()
throws ResourceException
getLogWriter in interface ManagedConnectionFactoryResourceExceptionpublic void setUserName(String userName)
userName - the user name to be set.public void setPassword(String password)
password - the passwor to be set.public UserPassword getUserPassword()
public int hashCode()
hashCode in interface ManagedConnectionFactoryhashCode in class Objectpublic boolean equals(Object o)
true if this
ManagedConnectionFactoryImpl is the same as the o argument.
equals in interface ManagedConnectionFactoryequals in class Objecto - Object to be compared with this.
true if this
ManagedConnectionFactoryImpl is the same as the o argument.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||