com.waveset.adapter
Class ResourceConnection

java.lang.Object
  extended bycom.waveset.adapter.ResourceConnection
Direct Known Subclasses:
ScriptedConnection

public abstract class ResourceConnection
extends java.lang.Object

The base class for connections to Resource objects. This class is the base connection class used by the ResourceConnectionManager and ResourceConnectionPool classes.


Field Summary
protected  java.util.HashMap _args
           
protected  boolean _connected
           
protected  boolean _pooled
           
protected  long _timeIdled
           
protected static Trace _trace
           
static java.lang.String code_id
           
 
Constructor Summary
ResourceConnection()
           
ResourceConnection(java.util.HashMap args)
           
ResourceConnection(java.util.HashMap args, boolean pooled)
           
 
Method Summary
abstract  boolean argsEqual(java.util.HashMap args)
          Tests if the attribute values in args matches with those set in the ResourceConnection object.
 void connect()
           
 void disconnect()
           
 java.lang.String getArgsType()
           
 long getTimeIdled()
          Returns the time the connection was last active.
 boolean isConnected()
          Reports if the connection is connected.
 boolean isPooled()
          Reports if the connection is pooled.
 void setArgs(java.util.HashMap args)
          Tests for valid attribute values passed in through args.
protected  void setConnected(boolean connected)
          Sets the connected attribute and the idle time to the current time.
 void setPooled(boolean pooled)
          Sets the pooled attribute.
protected  void setTimeIdled()
          Sets the idle time of the connection to the current time.
abstract  void testConnection(java.util.HashMap args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

_trace

protected static Trace _trace

_args

protected java.util.HashMap _args

_pooled

protected boolean _pooled

_connected

protected boolean _connected

_timeIdled

protected long _timeIdled
Constructor Detail

ResourceConnection

public ResourceConnection()

ResourceConnection

public ResourceConnection(java.util.HashMap args)
                   throws java.lang.IllegalArgumentException

ResourceConnection

public ResourceConnection(java.util.HashMap args,
                          boolean pooled)
                   throws java.lang.IllegalArgumentException
Method Detail

setArgs

public void setArgs(java.util.HashMap args)
             throws java.lang.IllegalArgumentException
Tests for valid attribute values passed in through args.

Throws:
java.lang.IllegalArgumentException

argsEqual

public abstract boolean argsEqual(java.util.HashMap args)
Tests if the attribute values in args matches with those set in the ResourceConnection object.


connect

public void connect()
             throws WavesetException
Throws:
WavesetException

disconnect

public void disconnect()
                throws WavesetException
Throws:
WavesetException

getArgsType

public java.lang.String getArgsType()

testConnection

public abstract void testConnection(java.util.HashMap args)
                             throws WavesetException
Throws:
WavesetException

setPooled

public void setPooled(boolean pooled)
Sets the pooled attribute.


isPooled

public boolean isPooled()
Reports if the connection is pooled.


isConnected

public boolean isConnected()
Reports if the connection is connected.


setConnected

protected void setConnected(boolean connected)
Sets the connected attribute and the idle time to the current time.


setTimeIdled

protected void setTimeIdled()
Sets the idle time of the connection to the current time.


getTimeIdled

public long getTimeIdled()
Returns the time the connection was last active.