org.ow2.easywsdl.extensions.wsdl4complexwsdl
Class WSDL4ComplexWsdlWriterResourcePool

java.lang.Object
  extended by org.ow2.easywsdl.extensions.wsdl4complexwsdl.WSDL4ComplexWsdlWriterResourcePool

public class WSDL4ComplexWsdlWriterResourcePool
extends java.lang.Object

This class represent a WSDL4ComplexWsdlWriter pool, which provides WSDL4ComplexWsdlWriter objects as resource.

Author:
Nicolas Oddoux - EBM WebSourcing

Constructor Summary
WSDL4ComplexWsdlWriterResourcePool(int minPoolSize, int maxPoolSize, com.ebmwebsourcing.easycommons.pooling.PoolPolicy poolPolicy)
          Allowing to instantiate a new WSDL4ComplexWsdlWriterResourcePool containing WSDL4ComplexWsdlWriter resources.
 
Method Summary
 void release(WSDL4ComplexWsdlWriter wsdl4ComplexWsdlWriter)
          Release the specified WSDL4ComplexWsdlWriter After putting back the WSDL4ComplexWsdlWriter in the pool, the method onRelease() of the WSDL4ComplexWsdlWriter resource handler is called.
 WSDL4ComplexWsdlWriter take()
          Take one unused WSDL4ComplexWsdlWriter in the current pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDL4ComplexWsdlWriterResourcePool

public WSDL4ComplexWsdlWriterResourcePool(int minPoolSize,
                                          int maxPoolSize,
                                          com.ebmwebsourcing.easycommons.pooling.PoolPolicy poolPolicy)
Allowing to instantiate a new WSDL4ComplexWsdlWriterResourcePool containing WSDL4ComplexWsdlWriter resources.

Parameters:
minPoolSize - The minimum number of WSDL4ComplexWsdlWriter instances in the pool (created at the initialization).
maxPoolSize - the maximum number of WSDL4ComplexWsdlWriter instances in the current pool (limit of the pool). It must be greater or equals to the specified minSize. The maximum value is Integer.MAX_VALUE
poolPolicy - the PoolPolicy to adopt when the maximum size is reached. it must not be null.
Method Detail

take

public WSDL4ComplexWsdlWriter take()
Take one unused WSDL4ComplexWsdlWriter in the current pool. After getting a WSDL4ComplexWsdlWriter from the pool and before returning a WSDL4ComplexWsdlWriter, the method onTake() of the WSDL4ComplexWsdlWriter resource handler is called.

Returns:
one WSDL4ComplexWsdlWriter
Throws:
com.ebmwebsourcing.easycommons.pooling.PoolException - if the current thread is interrupted for the pool policy WAIT or if there is no more available resource in the pool for the pool policy REJECT

release

public final void release(WSDL4ComplexWsdlWriter wsdl4ComplexWsdlWriter)
Release the specified WSDL4ComplexWsdlWriter After putting back the WSDL4ComplexWsdlWriter in the pool, the method onRelease() of the WSDL4ComplexWsdlWriter resource handler is called.

Parameters:
wsdl4ComplexWsdlWriter - The WSDL4ComplexWsdlWriter to release


Copyright © 2008-2012 Petals Link (previously EBM WebSourcing). All Rights Reserved.