org.placidus.jaxb
Class JaxbObjectPool

java.lang.Object
  extended by org.placidus.jaxb.JaxbObjectPool

public class JaxbObjectPool
extends java.lang.Object

The jaxb object pool clones a given jaxb-object, until poolsize is reached and fills pool up if object was used.

Author:
ds

Constructor Summary
JaxbObjectPool(java.lang.Object jaxbObject)
           
JaxbObjectPool(java.lang.Object jaxbObject, int poolSize)
          creating jaxb object pool
 
Method Summary
 java.lang.Object take()
          Takes an object of BlockingQueue which holds jaxbobjects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbObjectPool

public JaxbObjectPool(java.lang.Object jaxbObject)
               throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException

JaxbObjectPool

public JaxbObjectPool(java.lang.Object jaxbObject,
                      int poolSize)
               throws javax.xml.bind.JAXBException
creating jaxb object pool

Parameters:
jaxbObject - jaxbobject to clone
poolSize - size of pool
Throws:
javax.xml.bind.JAXBException
Method Detail

take

public java.lang.Object take()
                      throws java.lang.InterruptedException
Takes an object of BlockingQueue which holds jaxbobjects.

Returns:
jaxbobject
Throws:
java.lang.InterruptedException - if take gets interrupted


Copyright © 2006 DS. All Rights Reserved.