org.openmdx.base.security.pki
Class AbstractManagedConnectionFactory

java.lang.Object
  extended by org.openmdx.base.security.pki.AbstractManagedConnectionFactory
All Implemented Interfaces:
Serializable, ManagedConnectionFactory
Direct Known Subclasses:
ManagedKeyStoreConnectionFactory

public abstract class AbstractManagedConnectionFactory
extends Object
implements ManagedConnectionFactory

Abstract Managed Connection Factory

See Also:
Serialized Form

Constructor Summary
AbstractManagedConnectionFactory()
           
 
Method Summary
 Object createConnectionFactory()
           
 Object createConnectionFactory(ConnectionManager connectionManager)
           
 boolean equals(Object that)
          Overriding equals() is required.
 String getConnectionURL()
          Retrieve connectionURL.
protected  PasswordCredential getCredential(Subject subject, boolean mandatory)
           
 String getKeyStoreType()
          Retrieve keyStoreType.
 PrintWriter getLogWriter()
           
protected  char[][] getPassPhrases(PasswordCredential credential)
          Retrieve the first pass phrase encoded in the credential's password field
 String getPassPhraseSeparator()
          Retrieve passPhraseSeparator.
protected  String getPassword()
          Retrieve password.
 String getUserName()
          Retrieve userName.
 int hashCode()
          Overriding hashCode() is required.
protected  ResourceException log(ResourceException exception)
          Log and return an exception
 ManagedConnection matchManagedConnections(Set managedConnections, Subject subject, ConnectionRequestInfo connectionRequestInfo)
           
 void setConnectionURL(String connectionURL)
          Set connectionURL.
 void setKeyStoreType(String keyStoreType)
          Set keyStoreType.
 void setLogWriter(PrintWriter logWriter)
           
 void setPassPhraseSeparator(String passPhraseSeparator)
          Set passPhraseSeparator.
 void setPassword(String password)
          Set password.
 void setUserName(String userName)
          Set userName.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ManagedConnectionFactory
createManagedConnection
 

Constructor Detail

AbstractManagedConnectionFactory

public AbstractManagedConnectionFactory()
Method Detail

createConnectionFactory

public final Object createConnectionFactory()
                                     throws ResourceException
Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

createConnectionFactory

public final Object createConnectionFactory(ConnectionManager connectionManager)
                                     throws ResourceException
Specified by:
createConnectionFactory in interface ManagedConnectionFactory
Throws:
ResourceException

getLogWriter

public final PrintWriter getLogWriter()
                               throws ResourceException
Specified by:
getLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

matchManagedConnections

public final ManagedConnection matchManagedConnections(Set managedConnections,
                                                       Subject subject,
                                                       ConnectionRequestInfo connectionRequestInfo)
                                                throws ResourceException
Specified by:
matchManagedConnections in interface ManagedConnectionFactory
Throws:
ResourceException

getCredential

protected PasswordCredential getCredential(Subject subject,
                                           boolean mandatory)
                                    throws ResourceException
Parameters:
subject -
Returns:
Throws:
ResourceException

getPassPhrases

protected final char[][] getPassPhrases(PasswordCredential credential)
                                 throws ResourceException
Retrieve the first pass phrase encoded in the credential's password field

Parameters:
credential -
Returns:
the first pass phrase encoded in the credential's password field
Throws:
ResourceException

setLogWriter

public final void setLogWriter(PrintWriter logWriter)
                        throws ResourceException
Specified by:
setLogWriter in interface ManagedConnectionFactory
Throws:
ResourceException

getConnectionURL

public final String getConnectionURL()
Retrieve connectionURL.

Returns:
Returns the connectionURL.

setConnectionURL

public final void setConnectionURL(String connectionURL)
Set connectionURL.

Parameters:
connectionURL - The connectionURL to set.

getKeyStoreType

public final String getKeyStoreType()
Retrieve keyStoreType.

Returns:
Returns the keyStoreType.

setKeyStoreType

public final void setKeyStoreType(String keyStoreType)
Set keyStoreType.

Parameters:
keyStoreType - The keyStoreType to set.

getPassPhraseSeparator

public final String getPassPhraseSeparator()
Retrieve passPhraseSeparator.

Returns:
Returns the passPhraseSeparator.

setPassPhraseSeparator

public final void setPassPhraseSeparator(String passPhraseSeparator)
Set passPhraseSeparator.

Parameters:
passPhraseSeparator - The passPhraseSeparator to set.

log

protected final ResourceException log(ResourceException exception)
Log and return an exception

Parameters:
an - exception
Returns:
the exception

setPassword

public final void setPassword(String password)
Set password.

Parameters:
password - The password to set.

getPassword

protected final String getPassword()
Retrieve password.

Returns:
Returns the password.

getUserName

public final String getUserName()
Retrieve userName.

Returns:
Returns the userName.

setUserName

public final void setUserName(String userName)
Set userName.

Parameters:
userName - The userName to set.

equals

public boolean equals(Object that)
Overriding equals() is required.

Specified by:
equals in interface ManagedConnectionFactory
Overrides:
equals in class Object

hashCode

public int hashCode()
Overriding hashCode() is required.

Specified by:
hashCode in interface ManagedConnectionFactory
Overrides:
hashCode in class Object


This software is published under the BSD license. Copyright © 2003-2008, OMEX AG, Switzerland, All rights reserved. Use is subject to license terms.