org.jdesktop.wonderland.common.cell.state
Class CellServerStateFactory

java.lang.Object
  extended by org.jdesktop.wonderland.common.cell.state.CellServerStateFactory

public class CellServerStateFactory
extends java.lang.Object

The CellServerStateFactory returns marshallers and unmarshallers that can encode and decode XML that is bound to JAXB-annotated classes. This class uses Java's service provider mechanism to fetch the list of fully-qualified class names of Java objects that have JAXB annotations.

Classes that provide such a service must have an entry in the JAR file in which they are contained. In META-INF/services, a file named org.jdesktop.wonderland.common.cell.setup.CellServerStateSPI should contain the fully-qualified class name(s) of all classes that implement the CellServerStateSPI interface.

Author:
Jordan Slott

Constructor Summary
CellServerStateFactory()
           
 
Method Summary
static javax.xml.bind.Marshaller getMarshaller(ScannedClassLoader classLoader)
          Returns the object that marshalls JAXB-annotated classes into XML using classes available in the supplied classLoader.
static javax.xml.bind.Unmarshaller getUnmarshaller(ScannedClassLoader classLoader)
          Returns the object that unmarshalls XML into JAXB-annotated classes using classes available in the supplied classLoader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CellServerStateFactory

public CellServerStateFactory()
Method Detail

getMarshaller

public static javax.xml.bind.Marshaller getMarshaller(ScannedClassLoader classLoader)
Returns the object that marshalls JAXB-annotated classes into XML using classes available in the supplied classLoader. If classLoader is null the classloader for this class will be used.

Returns:
A marhsaller for JAXB-annotated classes

getUnmarshaller

public static javax.xml.bind.Unmarshaller getUnmarshaller(ScannedClassLoader classLoader)
Returns the object that unmarshalls XML into JAXB-annotated classes using classes available in the supplied classLoader. If classLoader is null the classloader for this class will be used.

Returns:
An unmarshaller for XML


Open Wonderland - http://openwonderland.org