All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ow2.easywsdl.extensions.wsdl4complexwsdl.WSDL4ComplexWsdlReaders Maven / Gradle / Ivy

The newest version!
/**
 * Copyright (c) 2008-2012 EBM WebSourcing, 2012-2023 Linagora
 * 
 * This program/library is free software: you can redistribute it and/or modify
 * it under the terms of the New BSD License (3-clause license).
 *
 * This program/library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the New BSD License (3-clause license)
 * for more details.
 *
 * You should have received a copy of the New BSD License (3-clause license)
 * along with this program/library; If not, see http://directory.fsf.org/wiki/License:BSD_3Clause/
 * for the New BSD License (3-clause license).
 */
 
package org.ow2.easywsdl.extensions.wsdl4complexwsdl;

import org.ow2.easywsdl.extensions.wsdl4complexwsdl.api.WSDL4ComplexWsdlReader;

import com.ebmwebsourcing.easycommons.pooling.PoolException;
import com.ebmwebsourcing.easycommons.pooling.PoolPolicy;

/**
 * A static pool of {@link WSDL4ComplexWsdlReader} to improve {@link WSDL4ComplexWsdlReader} creation efficiency. 
 * 

* A {@link WSDL4ComplexWsdlReader} is initialized the first time this class is used. * An infinite number (integer maximum value) of {@link WSDL4ComplexWsdlReader} may be created. They are never evicted. *

* * @author Nicolas Oddoux - EBM WebSourcing */ public final class WSDL4ComplexWsdlReaders { private static final WSDL4ComplexWsdlReaderResourcePool wsdl4ComplexWsdlReaderResourcePool = new WSDL4ComplexWsdlReaderResourcePool(1, Integer.MAX_VALUE, PoolPolicy.WAIT); /** * Take a {@link WSDL4ComplexWsdlReader} from the pool * * @return one {@link WSDL4ComplexWsdlReader} * * @throws PoolException * if the current thread waits for a {@link WSDL4ComplexWsdlReader} * of the pool and is interrupted */ public final static WSDL4ComplexWsdlReader takeWSDL4ComplexWsdlReader() throws PoolException { return wsdl4ComplexWsdlReaderResourcePool.take(); } /** * Release a {@link WSDL4ComplexWsdlReader} to the pool * * @param wsdl4ComplexWsdlReader a {@link WSDL4ComplexWsdlReader} to release */ public final static void releaseWSDL4ComplexWsdlReader(WSDL4ComplexWsdlReader wsdl4ComplexWsdlReader) { wsdl4ComplexWsdlReaderResourcePool.release(wsdl4ComplexWsdlReader); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy