org.glassfish.jersey.media.json.internal
Class JsonJaxbMarshaller
java.lang.Object
org.glassfish.jersey.media.json.internal.BaseJsonMarshaller
org.glassfish.jersey.media.json.internal.JsonJaxbMarshaller
- All Implemented Interfaces:
- Marshaller, JsonConfigured, JsonMarshaller
public final class JsonJaxbMarshaller
- extends BaseJsonMarshaller
- implements Marshaller
JSON JAXB marshaller.
- Author:
- Jakub Podlesak
|
Method Summary |
|
getAdapter(Class<A> type)
|
AttachmentMarshaller |
getAttachmentMarshaller()
|
ValidationEventHandler |
getEventHandler()
|
Marshaller.Listener |
getListener()
|
Node |
getNode(Object jaxbObject)
|
Object |
getProperty(String key)
|
Schema |
getSchema()
|
void |
marshal(Object jaxbObject,
ContentHandler handler)
|
void |
marshal(Object jaxbObject,
File file)
|
void |
marshal(Object jaxbObject,
Node node)
|
void |
marshal(Object jaxbObject,
OutputStream os)
|
void |
marshal(Object jaxbObject,
Result result)
|
void |
marshal(Object jaxbObject,
Writer writer)
|
void |
marshal(Object jaxbObject,
XMLEventWriter writer)
|
void |
marshal(Object jaxbObject,
XMLStreamWriter writer)
|
|
setAdapter(Class<A> type,
A adapter)
|
void |
setAdapter(XmlAdapter adapter)
|
void |
setAttachmentMarshaller(AttachmentMarshaller marshaller)
|
void |
setEventHandler(ValidationEventHandler handler)
|
void |
setListener(Marshaller.Listener listener)
|
void |
setProperty(String name,
Object value)
Set the particular property in the underlying implementation of
JsonMarshaller. |
void |
setSchema(Schema schema)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JsonJaxbMarshaller
public JsonJaxbMarshaller(JAXBContext jaxbContext,
JsonConfiguration jsonConfig)
throws JAXBException
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
Result result)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
OutputStream os)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
File file)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
Writer writer)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
ContentHandler handler)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
Node node)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
XMLStreamWriter writer)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
marshal
public void marshal(Object jaxbObject,
XMLEventWriter writer)
throws JAXBException
- Specified by:
marshal in interface Marshaller
- Throws:
JAXBException
getNode
public Node getNode(Object jaxbObject)
throws JAXBException
- Specified by:
getNode in interface Marshaller
- Throws:
JAXBException
setProperty
public void setProperty(String name,
Object value)
throws PropertyException
- Description copied from interface:
JsonMarshaller
- Set the particular property in the underlying implementation of
JsonMarshaller. Attempting to set an undefined property
will result in a PropertyException being thrown.
- Specified by:
setProperty in interface Marshaller- Specified by:
setProperty in interface JsonMarshaller- Overrides:
setProperty in class BaseJsonMarshaller
- Parameters:
name - the name of the property to be set. This value can either
be specified using one of the constant fields or a user
supplied string.value - the value of the property to be set
- Throws:
PropertyException - when there is an error processing the given
property or value
getProperty
public Object getProperty(String key)
throws PropertyException
- Specified by:
getProperty in interface Marshaller
- Throws:
PropertyException
setEventHandler
public void setEventHandler(ValidationEventHandler handler)
throws JAXBException
- Specified by:
setEventHandler in interface Marshaller
- Throws:
JAXBException
getEventHandler
public ValidationEventHandler getEventHandler()
throws JAXBException
- Specified by:
getEventHandler in interface Marshaller
- Throws:
JAXBException
setAdapter
public void setAdapter(XmlAdapter adapter)
- Specified by:
setAdapter in interface Marshaller
setAdapter
public <A extends XmlAdapter> void setAdapter(Class<A> type,
A adapter)
- Specified by:
setAdapter in interface Marshaller
getAdapter
public <A extends XmlAdapter> A getAdapter(Class<A> type)
- Specified by:
getAdapter in interface Marshaller
setAttachmentMarshaller
public void setAttachmentMarshaller(AttachmentMarshaller marshaller)
- Specified by:
setAttachmentMarshaller in interface Marshaller
getAttachmentMarshaller
public AttachmentMarshaller getAttachmentMarshaller()
- Specified by:
getAttachmentMarshaller in interface Marshaller
setSchema
public void setSchema(Schema schema)
- Specified by:
setSchema in interface Marshaller
getSchema
public Schema getSchema()
- Specified by:
getSchema in interface Marshaller
setListener
public void setListener(Marshaller.Listener listener)
- Specified by:
setListener in interface Marshaller
getListener
public Marshaller.Listener getListener()
- Specified by:
getListener in interface Marshaller
Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.