|
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.EmailConnection
Client accessible connection object. A javax.mail session presented as a Common Client Interface connection. An application level connection to the underlying javax.mail subsystem. The java.mail Session object is actually held by the ManagedConnection that creates this object. Interactions originate from this object.
Field Summary | |
protected EmailManagedConnection |
mConnection
The managed connection that created this connection. |
protected EmailConnectionData |
mData
The connection data for this particular connection. |
protected ArrayList |
mInteractions
The interactions created from thsi connection. |
Constructor Summary | |
protected |
EmailConnection(EmailManagedConnection connection,
EmailConnectionData data)
Create an EmailConnection. |
Method Summary | |
void |
begin()
Begins a local transaction on an EIS instance. |
protected void |
checkManagedConnection()
Check the managed connection associated with this connection. |
void |
close()
Initiates close of the connection handle at the application level. |
protected void |
closeInteraction(EmailInteraction interaction)
Close an interaction created by this connection. |
void |
commit()
Commits the current local transaction and release all locks held by the underlying EIS instance. |
Interaction |
createInteraction()
Creates an Interaction associated with this Connection. |
protected EmailConnectionData |
getConnectionData()
Get the connection data associated with this connection. |
LocalTransaction |
getLocalTransaction()
Returns a LocalTransaction instance that enables a component to demarcate resource manager local transactions on the Connection. |
protected EmailManagedConnection |
getManagedConnection()
Get the managed connection associated with this connection. |
protected Message[] |
getMessages()
Get any messages. |
ConnectionMetaData |
getMetaData()
Gets the information on the underlying EIS instance represented through an active connection. |
ResultSetInfo |
getResultSetInfo()
Gets the information on the ResultSet functionality supported by a connected EIS instance. |
protected Session |
getSession()
Get the session associated with this connection. |
protected Transport |
getTransport()
Get the transport associated with this connection. |
void |
rollback()
Rollbacks the current resource manager local transaction. |
protected void |
setManagedConnection(EmailManagedConnection connection)
Set the managed connection associated with this connection. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected EmailManagedConnection mConnection
protected EmailConnectionData mData
protected ArrayList mInteractions
Constructor Detail |
protected EmailConnection(EmailManagedConnection connection, EmailConnectionData data)
connection
- The managed connection that created this connection.data
- The specific connection data to be used for this connection.
This may be different that the connection data within the managed
connection object's configuration data if the Subject or
ConnectionRequestInfo specified alternate connection data.Method Detail |
protected void checkManagedConnection() throws ResourceException
ResourceException
- If this is a closed connection.protected EmailManagedConnection getManagedConnection() throws ResourceException
ResourceException
- If this is a closed connection.protected void setManagedConnection(EmailManagedConnection connection)
associateConnection()
method of the managed
connection to switch this application level connection to another
underlying managed connection (physical connection).
connection
- The managed connection object to associate with this
connection.EmailManagedConnection.associateConnection(Object)
protected EmailConnectionData getConnectionData() throws ResourceException
ResourceException
protected Session getSession() throws ResourceException
ResourceException
- If this is a closed connection.protected Transport getTransport() throws ResourceException
ResourceException
- If this is a closed connection.protected Message[] getMessages() throws ResourceException, MessagingException
ResourceException
- If this is a closed connection.
MessagingException
protected void closeInteraction(EmailInteraction interaction)
public void close() throws ResourceException
close
in interface Connection
ResourceException
- Exception thrown if close on a connection
handle fails. Any invalid connection close invocation--example,
calling close on a connection handle that is already closed--should
also throw this exception.public Interaction createInteraction() throws ResourceException
createInteraction
in interface Connection
ResourceException
- Failed to create an Interaction.public LocalTransaction getLocalTransaction() throws ResourceException
getLocalTransaction
in interface Connection
ResourceException
- Failed to return a LocalTransaction
instance because of a resource adapter error.
NotSupportedException
- Demarcation of Resource manager local
transactions is not supported on this Connection.begin()
,
commit()
,
rollback()
public ConnectionMetaData getMetaData() throws ResourceException
getMetaData
in interface Connection
ResourceException
- Failed to get information about the
connected EIS instance. Error can be resource adapter-internal,
EIS-specific or communication related.public ResultSetInfo getResultSetInfo() throws ResourceException
NotSupportedException
since the
ResultSet paradigm doesn't apply to email messages.
getResultSetInfo
in interface Connection
ResourceException
- Failed to get ResultSet related information.
NotSupportedException
- ResultSet functionality is not supported.public void commit() throws ResourceException
commit
in interface LocalTransaction
ResourceException
- Failed to commit a local transaction.
Examples of error cases are:
EmailManagedConnection.commit()
public void begin() throws ResourceException
begin
in interface LocalTransaction
ResourceException
- Failed to begin a local transaction.
Examples of error cases are:
EmailManagedConnection.begin()
public void rollback() throws ResourceException
rollback
in interface LocalTransaction
ResourceException
- Failed to rollback a local transaction.
Examples of error cases are:
EmailManagedConnection.rollback()
|
Email Answering System Version 1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |