com.infoengine.connector
Class IeConnectionRequestInfo

java.lang.Object
  extended byjava.util.Dictionary
      extended byjava.util.Hashtable
          extended byjava.util.Properties
              extended bycom.infoengine.connector.IeConnectionRequestInfo
All Implemented Interfaces:
Cloneable, javax.resource.spi.ConnectionRequestInfo, Map, Serializable

public class IeConnectionRequestInfo
extends Properties
implements javax.resource.spi.ConnectionRequestInfo

used to pass userName and password information when creating a new connection factory.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Hashtable
 
Field Summary
private  Principal authUser
           
static String CERTIFICATE_ALIAS
           
static String CONNECTION_IMPL
           
static String DEFAULT_CONNECTION_IMPL
           
private  String hash
           
static String KEYSTORE_FILENAME
           
static String KEYSTORE_PACKAGE_PROVIDER
           
static String KEYSTORE_PASS
           
static String KEYSTORE_TYPE
           
private  Locale locale
           
static String PASSWORD
           
private  PrivateKey privateKey
           
static String PRIVATEKEY_ALIAS
           
static String PRIVATEKEY_PASS
           
static String SIGN_REQUESTS
           
static String USERNAME
           
private  X509Certificate x509certificate
           
 
Fields inherited from class java.util.Properties
defaults
 
Fields inherited from class java.util.Hashtable
 
Constructor Summary
(package private) IeConnectionRequestInfo()
          create a new IeConnectionRequestInfo
 
Method Summary
private  void _rehash()
          rehash
 Object clone()
          make a copy of this object
 boolean equals(Object other)
          compare the ConnectionRequestInfo object with another for equality
 Principal getAuthUser()
          get the "trusted" authentcated user
 X509Certificate getCertificate()
           
 String getConnectionImplementation()
          Get the connection implementation in use
 Class getConnectionImplementationClass()
          Get the connection implementation class or null if invalid connectionImplementation
 Locale getLocale()
          get the request Locale
 String getPassword()
          get the default password
 PrivateKey getPrivateKey()
           
 String getUserName()
          get the default userName
 int hashCode()
          generate this object's hashCode.
private  void initSecurity()
           
 void load(String props)
          load properties from a string formated like a properties file
(package private)  void merge(IeConnectionSpec spec)
          merge info from IeConnection spec into this object
 void setAuthUser(Principal p)
          set the "trusted" authenticated user
 void setConnectionImplementation(String newImpl)
          set the connection implementation to use
 void setLocale(Locale locale)
          set the request Locale
 void setPassword(String newPassword)
          set the default password
 void setUserName(String newUser)
          set the default userName
 boolean signRequests()
          should the connector sign outgoing requests?
 String toString()
          return string representation user:pass
 
Methods inherited from class java.util.Properties
getProperty, getProperty, list, list, load, propertyNames, save, setProperty, store
 
Methods inherited from class java.util.Hashtable
clear, contains, containsKey, containsValue, elements, entrySet, get, isEmpty, keys, keySet, put, putAll, rehash, remove, size, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

USERNAME

public static final String USERNAME
See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
See Also:
Constant Field Values

CONNECTION_IMPL

public static final String CONNECTION_IMPL
See Also:
Constant Field Values

DEFAULT_CONNECTION_IMPL

public static final String DEFAULT_CONNECTION_IMPL
See Also:
Constant Field Values

SIGN_REQUESTS

public static final String SIGN_REQUESTS
See Also:
Constant Field Values

KEYSTORE_TYPE

public static final String KEYSTORE_TYPE
See Also:
Constant Field Values

KEYSTORE_PACKAGE_PROVIDER

public static final String KEYSTORE_PACKAGE_PROVIDER
See Also:
Constant Field Values

KEYSTORE_FILENAME

public static final String KEYSTORE_FILENAME
See Also:
Constant Field Values

KEYSTORE_PASS

public static final String KEYSTORE_PASS
See Also:
Constant Field Values

PRIVATEKEY_ALIAS

public static final String PRIVATEKEY_ALIAS
See Also:
Constant Field Values

PRIVATEKEY_PASS

public static final String PRIVATEKEY_PASS
See Also:
Constant Field Values

CERTIFICATE_ALIAS

public static final String CERTIFICATE_ALIAS
See Also:
Constant Field Values

x509certificate

private X509Certificate x509certificate

privateKey

private PrivateKey privateKey

locale

private Locale locale

authUser

private Principal authUser

hash

private String hash
Constructor Detail

IeConnectionRequestInfo

IeConnectionRequestInfo()
create a new IeConnectionRequestInfo

Method Detail

merge

void merge(IeConnectionSpec spec)
merge info from IeConnection spec into this object

Parameters:
spec -

setConnectionImplementation

public void setConnectionImplementation(String newImpl)
set the connection implementation to use

Parameters:
newImpl - new implementation class

getConnectionImplementation

public String getConnectionImplementation()
Get the connection implementation in use

Returns:
the implementation class to use

getConnectionImplementationClass

public Class getConnectionImplementationClass()
Get the connection implementation class or null if invalid connectionImplementation

Returns:
the class or null

setUserName

public void setUserName(String newUser)
set the default userName

Parameters:
newUser - new userName

getUserName

public String getUserName()
get the default userName

Returns:
String

setPassword

public void setPassword(String newPassword)
set the default password

Parameters:
newPassword - the new password

getPassword

public String getPassword()
get the default password

Returns:
String

setLocale

public void setLocale(Locale locale)
set the request Locale

Parameters:
locale - the locale to use

getLocale

public Locale getLocale()
get the request Locale

Returns:
Locale

setAuthUser

public void setAuthUser(Principal p)
set the "trusted" authenticated user

Parameters:
p -

getAuthUser

public Principal getAuthUser()
get the "trusted" authentcated user

Returns:
the auth user

signRequests

public boolean signRequests()
should the connector sign outgoing requests?

Returns:
boolean yes or no

initSecurity

private void initSecurity()
                   throws GeneralSecurityException,
                          PrivilegedActionException
Throws:
GeneralSecurityException
PrivilegedActionException

getCertificate

public X509Certificate getCertificate()
                               throws GeneralSecurityException,
                                      PrivilegedActionException
Throws:
GeneralSecurityException
PrivilegedActionException

getPrivateKey

public PrivateKey getPrivateKey()
                         throws GeneralSecurityException,
                                PrivilegedActionException
Throws:
GeneralSecurityException
PrivilegedActionException

_rehash

private void _rehash()
rehash


hashCode

public int hashCode()
generate this object's hashCode. based on userName and password.

Specified by:
hashCode in interface javax.resource.spi.ConnectionRequestInfo

equals

public boolean equals(Object other)
compare the ConnectionRequestInfo object with another for equality

Specified by:
equals in interface javax.resource.spi.ConnectionRequestInfo
Parameters:
other - object to compare to
Returns:
boolean

clone

public Object clone()
make a copy of this object

Returns:
Object (IeConnectionRequestInfo instance)

load

public void load(String props)
load properties from a string formated like a properties file

Parameters:
props - the properties to load

toString

public String toString()
return string representation user:pass

Returns:
String