|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ninecode.email.connector.EmailConnectionFactory
Front end email connection factory for the Connector architecture. ConnectionFactory provides an interface for getting connection to an EIS instance. An implementation of ConnectionFactory interface is provided by a resource adapter. Application code looks up a ConnectionFactory instance from JNDI namespace and uses it to get EIS connections. An implementation class for ConnectionFactory is required to implement java.io.Serializable and javax.resource.Referenceable interfaces to support JNDI registration.
Field Summary | |
protected EmailConfigurationData |
mConfigurationData
Configuration data. |
protected EmailConnectionData |
mConnectionData
Connection data. |
protected ConnectionManager |
mConnectionManager
The connection manager to use when creating connections. |
protected Reference |
mReference
Reference to this ConnectionFactory. |
Constructor Summary | |
EmailConnectionFactory()
Create a new instance of an EmailConnectionFactory. |
Method Summary | |
boolean |
equals(Object other)
Returns true if the other object is equal to this one. |
EmailConfigurationData |
getConfigurationData()
Getter for property configurationData. |
Connection |
getConnection()
Gets a connection to an EIS instance. |
Connection |
getConnection(ConnectionSpec spec)
Gets a connection to an EIS instance. |
EmailConnectionData |
getConnectionData()
Getter for property connectionData. |
ConnectionManager |
getConnectionManager()
Getter for property connectionManager. |
ManagedConnectionFactory |
getManagedConnectionFactory()
Getter for property managedConnectionFactory. |
ResourceAdapterMetaData |
getMetaData()
Gets metadata for the Resource Adapter. |
RecordFactory |
getRecordFactory()
Gets a RecordFactory instance. |
Reference |
getReference()
Retrieves the Reference of this object. |
int |
hashCode()
Returns a hash code for this object. |
void |
setConfigurationData(EmailConfigurationData data)
Setter for property configurationData. |
void |
setConnectionData(EmailConnectionData data)
Setter for property connectionData. |
void |
setConnectionManager(ConnectionManager manager)
Setter for property connectionManager. |
void |
setManagedConnectionFactory(ManagedConnectionFactory factory)
Setter for property managedConnectionFactory. |
void |
setReference(Reference reference)
Sets the Reference instance. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected ConnectionManager mConnectionManager
protected Reference mReference
protected EmailConfigurationData mConfigurationData
protected EmailConnectionData mConnectionData
Constructor Detail |
public EmailConnectionFactory()
Method Detail |
public boolean equals(Object other)
true
if the other object is equal to this one.
Ignores the mReference and mManagedConnectionFactory fields, since
these are derived from the others.
equals
in class Object
true
if the other object is equal to this one.public int hashCode()
hashCode
in class Object
public ManagedConnectionFactory getManagedConnectionFactory()
public void setManagedConnectionFactory(ManagedConnectionFactory factory)
factory
- The ManagedConnectionFactory to associate with this ConnectionFactory.public ConnectionManager getConnectionManager()
public void setConnectionManager(ConnectionManager manager)
manager
- The ConnectionManager to associate with this ConnectionFactory.public EmailConfigurationData getConfigurationData()
public void setConfigurationData(EmailConfigurationData data)
data
- New value of property configurationData.public EmailConnectionData getConnectionData()
public void setConnectionData(EmailConnectionData data)
data
- New value of property connectionData.public Connection getConnection() throws ResourceException
getConnection
in interface ConnectionFactory
ResourceException
- Failed to get a connection to the
EIS instance. Examples of error cases are:
Invalid configuration of ManagedConnectionFactory -- example: invalid server name
Application server-internal error -- example: connection pool related error
Communication error
EIS-specific error -- example: EIS not active
Resource adapter-internal error
Security related error -- example: invalid user
Failure to allocate system resourcespublic Connection getConnection(ConnectionSpec spec) throws ResourceException
getConnection
in interface ConnectionFactory
spec
- Connection parameters and security information specified
as ConnectionSpec instance.
ResourceException
- Failed to get a connection to the EIS instance.
Examples of error cases are:
Invalid specification of input parameters
Invalid configuration of ManagedConnectionFactory -- example: invalid server name
Application server-internal error -- example: connection pool related error
Communication error
EIS-specific error -- example: EIS not active
Resource adapter-internal error
Security related error -- example: invalid user
Failure to allocate system resourcespublic ResourceAdapterMetaData getMetaData() throws ResourceException
getMetaData
in interface ConnectionFactory
ResourceException
- Failed to get metadata information about
the resource adapter.public RecordFactory getRecordFactory() throws ResourceException
getRecordFactory
in interface ConnectionFactory
ResourceException
- Failed to create a RecordFactory.
NotSupportedException
- Operation not supported.public void setReference(Reference reference)
setReference
in interface Referenceable
reference
- - A Reference instance.public Reference getReference() throws NamingException
getReference
in interface Referenceable
NamingException
- If a naming exception was encountered
while retrieving the reference.
|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |