com.sun.jersey.json.impl
Class JSONMarshaller

java.lang.Object
  extended by com.sun.jersey.json.impl.JSONMarshaller
All Implemented Interfaces:
JSONConfigurated, javax.xml.bind.Marshaller

public final class JSONMarshaller
extends java.lang.Object
implements javax.xml.bind.Marshaller, JSONConfigurated

Author:
japod

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.xml.bind.Marshaller
javax.xml.bind.Marshaller.Listener
 
Field Summary
 
Fields inherited from interface javax.xml.bind.Marshaller
JAXB_ENCODING, JAXB_FORMATTED_OUTPUT, JAXB_FRAGMENT, JAXB_NO_NAMESPACE_SCHEMA_LOCATION, JAXB_SCHEMA_LOCATION
 
Constructor Summary
JSONMarshaller(javax.xml.bind.JAXBContext jaxbContext, JSONConfiguration jsonConfig)
           
 
Method Summary
<A extends javax.xml.bind.annotation.adapters.XmlAdapter>
A
getAdapter(java.lang.Class<A> type)
           
 javax.xml.bind.attachment.AttachmentMarshaller getAttachmentMarshaller()
           
 javax.xml.bind.ValidationEventHandler getEventHandler()
           
 JSONConfiguration getJSONConfiguration()
          Provides information on current JSON configuration options for this object.
 javax.xml.bind.Marshaller.Listener getListener()
           
 org.w3c.dom.Node getNode(java.lang.Object jaxbObject)
           
 java.lang.Object getProperty(java.lang.String key)
           
 javax.xml.validation.Schema getSchema()
           
 boolean isJsonEnabled()
           
 void marshal(java.lang.Object jaxbObject, org.xml.sax.ContentHandler handler)
           
 void marshal(java.lang.Object jaxbObject, java.io.File file)
           
 void marshal(java.lang.Object jaxbObject, org.w3c.dom.Node node)
           
 void marshal(java.lang.Object jaxbObject, java.io.OutputStream os)
           
 void marshal(java.lang.Object jaxbObject, javax.xml.transform.Result result)
           
 void marshal(java.lang.Object jaxbObject, java.io.Writer writer)
           
 void marshal(java.lang.Object jaxbObject, javax.xml.stream.XMLEventWriter writer)
           
 void marshal(java.lang.Object jaxbObject, javax.xml.stream.XMLStreamWriter writer)
           
<A extends javax.xml.bind.annotation.adapters.XmlAdapter>
void
setAdapter(java.lang.Class<A> type, A adapter)
           
 void setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter adapter)
           
 void setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller marshaller)
           
 void setEventHandler(javax.xml.bind.ValidationEventHandler handler)
           
 void setJsonEnabled(boolean jsonEnabled)
           
 void setListener(javax.xml.bind.Marshaller.Listener listener)
           
 void setProperty(java.lang.String key, java.lang.Object value)
           
 void setSchema(javax.xml.validation.Schema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSONMarshaller

public JSONMarshaller(javax.xml.bind.JAXBContext jaxbContext,
                      JSONConfiguration jsonConfig)
               throws javax.xml.bind.JAXBException
Throws:
javax.xml.bind.JAXBException
Method Detail

marshal

public void marshal(java.lang.Object jaxbObject,
                    javax.xml.transform.Result result)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    java.io.OutputStream os)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    java.io.File file)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    java.io.Writer writer)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    org.xml.sax.ContentHandler handler)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    org.w3c.dom.Node node)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    javax.xml.stream.XMLStreamWriter writer)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

marshal

public void marshal(java.lang.Object jaxbObject,
                    javax.xml.stream.XMLEventWriter writer)
             throws javax.xml.bind.JAXBException
Specified by:
marshal in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

getNode

public org.w3c.dom.Node getNode(java.lang.Object jaxbObject)
                         throws javax.xml.bind.JAXBException
Specified by:
getNode in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

setProperty

public void setProperty(java.lang.String key,
                        java.lang.Object value)
                 throws javax.xml.bind.PropertyException
Specified by:
setProperty in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.PropertyException

isJsonEnabled

public boolean isJsonEnabled()

setJsonEnabled

public void setJsonEnabled(boolean jsonEnabled)

getProperty

public java.lang.Object getProperty(java.lang.String key)
                             throws javax.xml.bind.PropertyException
Specified by:
getProperty in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.PropertyException

setEventHandler

public void setEventHandler(javax.xml.bind.ValidationEventHandler handler)
                     throws javax.xml.bind.JAXBException
Specified by:
setEventHandler in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

getEventHandler

public javax.xml.bind.ValidationEventHandler getEventHandler()
                                                      throws javax.xml.bind.JAXBException
Specified by:
getEventHandler in interface javax.xml.bind.Marshaller
Throws:
javax.xml.bind.JAXBException

setAdapter

public void setAdapter(javax.xml.bind.annotation.adapters.XmlAdapter adapter)
Specified by:
setAdapter in interface javax.xml.bind.Marshaller

setAdapter

public <A extends javax.xml.bind.annotation.adapters.XmlAdapter> void setAdapter(java.lang.Class<A> type,
                                                                                 A adapter)
Specified by:
setAdapter in interface javax.xml.bind.Marshaller

getAdapter

public <A extends javax.xml.bind.annotation.adapters.XmlAdapter> A getAdapter(java.lang.Class<A> type)
Specified by:
getAdapter in interface javax.xml.bind.Marshaller

setAttachmentMarshaller

public void setAttachmentMarshaller(javax.xml.bind.attachment.AttachmentMarshaller marshaller)
Specified by:
setAttachmentMarshaller in interface javax.xml.bind.Marshaller

getAttachmentMarshaller

public javax.xml.bind.attachment.AttachmentMarshaller getAttachmentMarshaller()
Specified by:
getAttachmentMarshaller in interface javax.xml.bind.Marshaller

setSchema

public void setSchema(javax.xml.validation.Schema schema)
Specified by:
setSchema in interface javax.xml.bind.Marshaller

getSchema

public javax.xml.validation.Schema getSchema()
Specified by:
getSchema in interface javax.xml.bind.Marshaller

setListener

public void setListener(javax.xml.bind.Marshaller.Listener listener)
Specified by:
setListener in interface javax.xml.bind.Marshaller

getListener

public javax.xml.bind.Marshaller.Listener getListener()
Specified by:
getListener in interface javax.xml.bind.Marshaller

getJSONConfiguration

public JSONConfiguration getJSONConfiguration()
Description copied from interface: JSONConfigurated
Provides information on current JSON configuration options for this object.

Specified by:
getJSONConfiguration in interface JSONConfigurated
Returns:
a non-null JSONConfiguration instance.


Copyright © 2009 Sun Microsystems, Inc. All Rights Reserved.