com.sun.jersey.json.impl
Class JSONMarshallerImpl
java.lang.Object
com.sun.jersey.json.impl.BaseJSONMarshaller
com.sun.jersey.json.impl.JSONMarshallerImpl
- All Implemented Interfaces:
- JSONConfigurated, JSONMarshaller, Marshaller
public final class JSONMarshallerImpl
- extends BaseJSONMarshaller
- implements Marshaller
- Author:
- Jakub.Podlesak@Sun.COM
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 |
JSONMarshallerImpl
public JSONMarshallerImpl(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 JSONMarshaller
- Specified by:
setProperty
in interface Marshaller
- 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 © 2011 Oracle Corporation. All Rights Reserved.