org.gcube.data.spd.obisplugin.pool
Class PluginSessionPool

java.lang.Object
  extended by org.gcube.data.spd.obisplugin.pool.ObjectPool<PluginSession>
      extended by org.gcube.data.spd.obisplugin.pool.PluginSessionPool

public class PluginSessionPool
extends ObjectPool<PluginSession>

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Field Summary
protected  DatabaseCredential databaseCredential
           
protected  org.apache.log4j.Logger logger
           
 
Fields inherited from class org.gcube.data.spd.obisplugin.pool.ObjectPool
closed, expirationTime, locked, name, unlocked
 
Constructor Summary
PluginSessionPool(DatabaseCredential databaseCredential)
           
 
Method Summary
protected  PluginSession create()
          
protected  Connection createConnection()
           
protected  void expire(PluginSession session)
          
 void setDatabaseCredential(DatabaseCredential databaseCredential)
           
protected  boolean validate(PluginSession session)
          
 
Methods inherited from class org.gcube.data.spd.obisplugin.pool.ObjectPool
checkIn, checkOut, expireAllLocked, expireAllUnlocked, shutdown, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

protected org.apache.log4j.Logger logger

databaseCredential

protected DatabaseCredential databaseCredential
Constructor Detail

PluginSessionPool

public PluginSessionPool(DatabaseCredential databaseCredential)
Method Detail

setDatabaseCredential

public void setDatabaseCredential(DatabaseCredential databaseCredential)
Parameters:
databaseCredential - the databaseCredential to set

create

protected PluginSession create()

Specified by:
create in class ObjectPool<PluginSession>

createConnection

protected Connection createConnection()
                               throws SQLException
Throws:
SQLException

validate

protected boolean validate(PluginSession session)

Specified by:
validate in class ObjectPool<PluginSession>

expire

protected void expire(PluginSession session)

Specified by:
expire in class ObjectPool<PluginSession>


Copyright © 2013. All Rights Reserved.