com.wiley.posa3.resourcelifecyclemanager
Class Connection

java.lang.Object
  extended bycom.wiley.posa3.resourcelifecyclemanager.Connection
All Implemented Interfaces:
EvictionInterface, ManagedResource, Resource

public class Connection
extends java.lang.Object
implements ManagedResource, EvictionInterface

Connection is a resource that implements both ManagedResource and EvictionInteface.

Version:
1.0
Author:
Michael Kircher, Prashant Jain

Constructor Summary
Connection()
           
 
Method Summary
 void authenticate(SecurityToken token)
          Authenticate the connection using the security token
 void beforeEviction()
          The beforeEviction() method serves as a hook method that can be called by the Evictor before it evicts an object.
 Identity getId()
          Get the identity of this resource
 java.lang.Object info()
          The info() method is used by the Evictor to extract strategy-specific information from the object, to determine whether or not to evict it.
 boolean isEvictable()
          The method isEvictable() is used to determine whether this connection object is evictable.
 void method1()
          Some generic method.
 void method2()
          Some generic method.
 ResourceType type()
          Get the type of resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Connection

public Connection()
Method Detail

authenticate

public void authenticate(SecurityToken token)
Authenticate the connection using the security token

Parameters:
token - security token to use for authentication

type

public ResourceType type()
Get the type of resource.

Specified by:
type in interface ManagedResource
Returns:
the type of resource, which is ResourceType.CONNECTION

getId

public Identity getId()
Get the identity of this resource

Specified by:
getId in interface Resource
Returns:
The identity of this resource

isEvictable

public boolean isEvictable()
The method isEvictable() is used to determine whether this connection object is evictable.

Specified by:
isEvictable in interface EvictionInterface
Returns:
boolean true if the connection is evictable, false otherwise

beforeEviction

public void beforeEviction()
The beforeEviction() method serves as a hook method that can be called by the Evictor before it evicts an object. This gives the connection object a chance to release any resources it may have acquired.

Specified by:
beforeEviction in interface EvictionInterface

info

public java.lang.Object info()
The info() method is used by the Evictor to extract strategy-specific information from the object, to determine whether or not to evict it.

Specified by:
info in interface EvictionInterface
Returns:
Object strategy-specific information

method1

public void method1()
Some generic method.

Specified by:
method1 in interface Resource

method2

public void method2()
Some generic method.

Specified by:
method2 in interface Resource


Copyright 2004 John Wiley and Sons. All Rights Reserved.