|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.deegree_impl.tools.ObjectPool
org.deegree_impl.enterprise.WMServicePool
Pool of WMService-Instances. Singleton.
Field Summary | |
private WMSCapabilities |
capabilities
all WMServices of this pool conform to these capabilities |
private static WMServicePool |
instance
the only instance of this class |
Fields inherited from class org.deegree_impl.tools.ObjectPool |
available, existingInstances, in_use, startLifeTime, startUsageTime |
Fields inherited from class java.util.TimerTask |
|
Constructor Summary | |
private |
WMServicePool(WMSCapabilities capabilities)
Private constructor to realize the singleton pattern. |
Method Summary | |
java.lang.Object |
acuireObject()
Acquires an instance of WMService from the pool. |
void |
destroy()
Clears the pool. |
void |
fill(int noOfInstances)
Fills the pool with the given number of instances. |
static WMServicePool |
getInstance(WMSCapabilities capabilities)
Returns the only instance of this class. |
void |
onObjectKill(java.lang.Object o)
This method will be called when the submitted object is removed from the pool. |
java.lang.String |
toString()
Produces a textual representation of this object. |
Methods inherited from class org.deegree_impl.tools.ObjectPool |
clear, getInstance, getMaxInstances, getMaxLifeTime, getMaxUsageTime, getUpdateInterval, releaseObject, run, setMaxInstances, setMaxLifeTime, setMaxUsageTime, setUpdateInterval |
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static WMServicePool instance
private WMSCapabilities capabilities
Constructor Detail |
private WMServicePool(WMSCapabilities capabilities) throws java.lang.Exception
capabilities
- the capabilities the pool objects must conform toMethod Detail |
public static WMServicePool getInstance(WMSCapabilities capabilities) throws java.lang.Exception
java.lang.Exception
public void destroy()
public java.lang.Object acuireObject() throws java.lang.Exception
java.lang.Exception
public void fill(int noOfInstances)
noOfInstances
- number of instances to createpublic void onObjectKill(java.lang.Object o)
onObjectKill
in class ObjectPool
o
- the object to killpublic java.lang.String toString()
toString
in class ObjectPool
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |