OSCI2-StarterKit


eu.osci.messageparts
Class JaxbMarshallerHolder

java.lang.Object
  extended by eu.osci.messageparts.JaxbMarshallerHolder

public class JaxbMarshallerHolder
extends java.lang.Object

Class which holds JAXB Marshaller and Unmarshaller in a pool.
Copyright © 2010 Freie Hansestadt Bremen.
Created by bremen online services Entwicklungs- und Betriebsgesellschaft mbH & Co. KG.
This library (Starter Kit) can be used by anybody according to the Bremer Lizenz für freie Softwarebibliotheken. The license terms can be viewed at www.osci.de or can be ordered at the OSCI-Leitstelle (Die Senatorin für Finanzen, Freie Hansestadt Bremen, Postfach 10 15 40, 28015 Bremen).


Constructor Summary
JaxbMarshallerHolder(javax.xml.bind.JAXBContext context)
          Constructor to create a JaxbMarshallerHolder object with the given JAXB context.
 
Method Summary
static JaxbMarshallerHolder getAddressingMarshallerHolder()
          Returns a Marshaller for the addressing context for performance reasons.
static JaxbMarshallerHolder getLetterStyleMarshallerHolder()
          Returns a Marshaller for the LetterStyle context for performance reasons.
 javax.xml.bind.Marshaller getMarshaller()
          Returns a Marshaller object matching the JAXB context managed by this object.
static JaxbMarshallerHolder getOSCIMarshallerHolder()
          Returns a Marshaller for the OSCI context for performance reasons.
 javax.xml.bind.Unmarshaller getUnmarshaller()
          Returns an Unmarshaller object matching the JAXB context managed by this object.
static JaxbMarshallerHolder getWsTrusteMarshallerHolder()
          Returns a Marshaller for the WSTrust context for performance reasons.
static JaxbMarshallerHolder getXKMSMarshallerHolder()
          Returns a Marshaller for the XKMS context for performance reasons.
 void recycle(javax.xml.bind.Marshaller marshaller)
          Recycles a Marshaller object back to be used again later.
 void recycle(javax.xml.bind.Unmarshaller unmarshaller)
          Recycles an Unmarshaller object back to be used again later.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JaxbMarshallerHolder

public JaxbMarshallerHolder(javax.xml.bind.JAXBContext context)
                     throws javax.xml.bind.JAXBException
Constructor to create a JaxbMarshallerHolder object with the given JAXB context.

Parameters:
context - JAXBContext
Throws:
javax.xml.bind.JAXBException
Method Detail

getMarshaller

public javax.xml.bind.Marshaller getMarshaller()
                                        throws javax.xml.bind.JAXBException
Returns a Marshaller object matching the JAXB context managed by this object. After using it, you should give it back by calling recycle(Marshaller).

Throws:
javax.xml.bind.JAXBException

recycle

public void recycle(javax.xml.bind.Marshaller marshaller)
Recycles a Marshaller object back to be used again later.

Parameters:
marshaller - to be recycled

getUnmarshaller

public javax.xml.bind.Unmarshaller getUnmarshaller()
                                            throws javax.xml.bind.JAXBException
Returns an Unmarshaller object matching the JAXB context managed by this object. After using it, you should give it back by calling recycle(Unmarshaller).

Throws:
javax.xml.bind.JAXBException

recycle

public void recycle(javax.xml.bind.Unmarshaller unmarshaller)
Recycles an Unmarshaller object back to be used again later.

Parameters:
unmarshaller - to be recycled

getOSCIMarshallerHolder

public static JaxbMarshallerHolder getOSCIMarshallerHolder()
                                                    throws javax.xml.bind.JAXBException
Returns a Marshaller for the OSCI context for performance reasons.

Throws:
javax.xml.bind.JAXBException

getAddressingMarshallerHolder

public static JaxbMarshallerHolder getAddressingMarshallerHolder()
                                                          throws javax.xml.bind.JAXBException
Returns a Marshaller for the addressing context for performance reasons.

Throws:
javax.xml.bind.JAXBException

getXKMSMarshallerHolder

public static JaxbMarshallerHolder getXKMSMarshallerHolder()
                                                    throws javax.xml.bind.JAXBException
Returns a Marshaller for the XKMS context for performance reasons.

Throws:
javax.xml.bind.JAXBException

getLetterStyleMarshallerHolder

public static JaxbMarshallerHolder getLetterStyleMarshallerHolder()
                                                           throws javax.xml.bind.JAXBException
Returns a Marshaller for the LetterStyle context for performance reasons.

Throws:
javax.xml.bind.JAXBException

getWsTrusteMarshallerHolder

public static JaxbMarshallerHolder getWsTrusteMarshallerHolder()
                                                        throws javax.xml.bind.JAXBException
Returns a Marshaller for the WSTrust context for performance reasons.

Throws:
javax.xml.bind.JAXBException

OSCI2-StarterKit


Copyright © 2010 Freie Hansestadt Bremen.