atg.service.resourcepool
Class ResourceObject

java.lang.Object
  extended by atg.service.resourcepool.ResourceObject

public class ResourceObject
extends java.lang.Object

Wraps around a pooled resource keeping vital information on the pooling state of the resource.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 java.lang.String mCheckOutTag
          The tag identifying who checked out this object.
 boolean mIsCheckedOut
          Indicates whether or not this object is currently checked out.
 boolean mIsValid
          Indicates whether or not this object is valid for use.
 java.lang.String mParentName
          The parent resource pool's name.
 int mPoolLocation
          The location of this resource in the pool.
 java.lang.Object mResource
          The resource.
 long mTimeCheckedOut
          The time in milliseconds when this object was checked out.
 
Constructor Summary
ResourceObject()
           
 
Method Summary
 int getCheckoutCount()
          Returns property checkoutCount.
 java.lang.String getCheckOutTag()
          Returns the tag passed in upon check-out used to identify who has checked out this object.
 boolean getIsCheckedOut()
          Returns whether or not this object is still checked out.
 boolean getIsValid()
          Returns whether or not this object is valid for use.
 java.lang.Thread getOwningThread()
          Returns property owningThread.
 java.lang.String getParentName()
          Returns the parent resource pool's name.
 int getPoolLocation()
          Returns the location of this resource in the pool.
 java.lang.Object getResource()
          Returns the resource.
 long getTimeCheckedOut()
          Returns the time in milliseconds this object was checked out of the resource pool.
 long getTimeCreated()
          Returns property timeCreated.
 void reset()
          Resets all of the members that contain check-out data to their default values at object instantiation.
 ResourceObject setCheckoutCount(int pCheckoutCount)
          Sets property checkoutCount.
 ResourceObject setCheckOutTag(java.lang.String pCheckOutTag)
          Sets the tag passed in upon check-out to identify who has checked out this object.
 ResourceObject setIsCheckedOut(boolean pIsCheckedOut)
          Sets whether or not this object is still checked out.
 ResourceObject setIsValid(boolean pIsValid)
          Sets whether or not this object is still valid to use.
 ResourceObject setOwningThread(java.lang.Thread pOwningThread)
          Sets property owningThread.
 ResourceObject setParentName(java.lang.String pParentName)
          Sets the parent resource pool's name.
 ResourceObject setPoolLocation(int pPoolLocation)
          Sets the location of this resource in the pool.
 ResourceObject setResource(java.lang.Object pResource)
          Sets the resource.
 ResourceObject setTimeCheckedOut(long pTime)
          Sets the time in milliseconds this object was checked out of the resource pool.
 ResourceObject setTimeCreated(long pTimeCreated)
          Sets property timeCreated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mResource

public java.lang.Object mResource
The resource.


mParentName

public java.lang.String mParentName
The parent resource pool's name.


mPoolLocation

public int mPoolLocation
The location of this resource in the pool.


mCheckOutTag

public java.lang.String mCheckOutTag
The tag identifying who checked out this object.


mTimeCheckedOut

public long mTimeCheckedOut
The time in milliseconds when this object was checked out.


mIsCheckedOut

public boolean mIsCheckedOut
Indicates whether or not this object is currently checked out.


mIsValid

public boolean mIsValid
Indicates whether or not this object is valid for use.

Constructor Detail

ResourceObject

public ResourceObject()
Method Detail

setResource

public ResourceObject setResource(java.lang.Object pResource)
Sets the resource.

Parameters:
pResource - the resource

getResource

public java.lang.Object getResource()
Returns the resource.

Returns:
Object

setParentName

public ResourceObject setParentName(java.lang.String pParentName)
Sets the parent resource pool's name.

Parameters:
pParentName - the parent name

getParentName

public java.lang.String getParentName()
Returns the parent resource pool's name.

Returns:
String

setPoolLocation

public ResourceObject setPoolLocation(int pPoolLocation)
Sets the location of this resource in the pool.

Parameters:
pLocation - the location

getPoolLocation

public int getPoolLocation()
Returns the location of this resource in the pool.

Returns:
int

setCheckOutTag

public ResourceObject setCheckOutTag(java.lang.String pCheckOutTag)
Sets the tag passed in upon check-out to identify who has checked out this object.

Parameters:
pCheckOutTag - the identifying tag

getCheckOutTag

public java.lang.String getCheckOutTag()
Returns the tag passed in upon check-out used to identify who has checked out this object.

Returns:
String the identifying tag

setTimeCheckedOut

public ResourceObject setTimeCheckedOut(long pTime)
Sets the time in milliseconds this object was checked out of the resource pool.

Parameters:
pTime - milliseconds when checked out

getTimeCheckedOut

public long getTimeCheckedOut()
Returns the time in milliseconds this object was checked out of the resource pool.

Returns:
long milliseconds when checked out

setIsCheckedOut

public ResourceObject setIsCheckedOut(boolean pIsCheckedOut)
Sets whether or not this object is still checked out.


getIsCheckedOut

public boolean getIsCheckedOut()
Returns whether or not this object is still checked out.

Returns:
true if checked out
false if checked in

setIsValid

public ResourceObject setIsValid(boolean pIsValid)
Sets whether or not this object is still valid to use.


getIsValid

public boolean getIsValid()
Returns whether or not this object is valid for use.

Returns:
true if valid
false if not valid

setTimeCreated

public ResourceObject setTimeCreated(long pTimeCreated)
Sets property timeCreated.
Time in millis when the resource was created.

Parameters:
pTimeCreated - new value to set

getTimeCreated

public long getTimeCreated()
Returns property timeCreated.
Time in millis when the resource was created.

Returns:
long

setCheckoutCount

public ResourceObject setCheckoutCount(int pCheckoutCount)
Sets property checkoutCount.
The number of times this resource has been checked out of the pool.

Parameters:
pCheckoutCount - new value to set

getCheckoutCount

public int getCheckoutCount()
Returns property checkoutCount.
The number of times this resource has been checked out of the pool.

Returns:
int

setOwningThread

public ResourceObject setOwningThread(java.lang.Thread pOwningThread)
Sets property owningThread.
The thread who checked this resource out of the pool.

Parameters:
pOwningThread - new value to set

getOwningThread

public java.lang.Thread getOwningThread()
Returns property owningThread.
The thread who checked this resource out of the pool.

Returns:
Thread

reset

public void reset()
Resets all of the members that contain check-out data to their default values at object instantiation. This does NOT destroy or touch the resource itself, just the check-out data.