tyrex.resource.javamail
Class JavaMailResource

java.lang.Object
  extended bytyrex.resource.javamail.JavaMailResource
All Implemented Interfaces:
Resource

public class JavaMailResource
extends java.lang.Object
implements Resource

Java Mail resource allows creation of a Session from the Resource Configuration and accessed using the name provided.

Version:
$Revision: 1.1 $
Author:
Ashish Agrawal

Constructor Summary
JavaMailResource(java.lang.Object factory, java.util.Properties properties)
           
 
Method Summary
 void destroy()
          Called to destory the resource once it is no longer in use.
 java.lang.Object getClientFactory()
          Instantiates an instance of the mail Session based on the resource configuration provided.
 java.lang.Class getClientFactoryClass()
          Returns the client connection factory class.
 PoolLimits getPoolLimits()
          Returns the limits placed on the connection pool.
 PoolMetrics getPoolMetrics()
          Returns the pool metrics.
 javax.transaction.xa.XAResource getXAResource()
          Returns the XA resource interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaMailResource

public JavaMailResource(java.lang.Object factory,
                        java.util.Properties properties)
Method Detail

getPoolMetrics

public PoolMetrics getPoolMetrics()
Description copied from interface: Resource
Returns the pool metrics. The pool metrics object can be used to collect statistical information about the connection pool.

Specified by:
getPoolMetrics in interface Resource
Returns:
The pool metrics

getClientFactory

public java.lang.Object getClientFactory()
Instantiates an instance of the mail Session based on the resource configuration provided.

Specified by:
getClientFactory in interface Resource
Returns:
The client connection factory

getClientFactoryClass

public java.lang.Class getClientFactoryClass()
Description copied from interface: Resource
Returns the client connection factory class. This the class or interface that a client connection factory would implement.

Specified by:
getClientFactoryClass in interface Resource
Returns:
The client connection factory class

getXAResource

public javax.transaction.xa.XAResource getXAResource()
Description copied from interface: Resource
Returns the XA resource interface. The XA resource is used to manage transaction enlistment and recovery of the resource. This method returns null if the resource does not support XA transactions.

Specified by:
getXAResource in interface Resource
Returns:
The XA resource interface

getPoolLimits

public PoolLimits getPoolLimits()
Description copied from interface: Resource
Returns the limits placed on the connection pool. This object can be used to investigate the limits of the connection pool and to change them at run time.

Specified by:
getPoolLimits in interface Resource
Returns:
The limits placed on the connection pool

destroy

public void destroy()
Description copied from interface: Resource
Called to destory the resource once it is no longer in use. After successful return from this method, all open connections are invalidated and no new connections can be obtained from the pool.

The application server must render the connection factory inaccessible to the application before calling this method.

Specified by:
destroy in interface Resource


Original code is Copyright (c) 1999-2001, Intalio, Inc. All Rights Reserved. Contributions by MetaBoss team are Copyright (c) 2003-2005, Softaris Pty. Ltd. All Rights Reserved.