de.netseeker.ejoe.adapter
Class Jaxb2Adapter
java.lang.Object
de.netseeker.ejoe.adapter.BaseAdapter
de.netseeker.ejoe.adapter.Jaxb2Adapter
- All Implemented Interfaces:
- SerializeAdapter, java.io.Serializable
public class Jaxb2Adapter
- extends BaseAdapter
- Since:
- 0.4.0
- Author:
- netseeker
- See Also:
- Serialized Form
Constructor Summary |
Jaxb2Adapter()
Creates a instance of this adapter with an empty binding using jaxb.properties and Configuration.xml from
de.netseeker.ejoe.adapter.jaxb |
Jaxb2Adapter(java.lang.String packagePath)
|
Method Summary |
java.lang.String |
getContentType()
|
void |
handleClassLoaderChange(java.lang.ClassLoader classLoader)
Signals a change of the ContextClassLoader of the current thread to the adapter. |
java.lang.Object |
read(java.io.InputStream in)
Deserializes an object out of an given InputStream |
void |
write(java.lang.Object obj,
java.io.OutputStream out)
Serializes an object into an output stream |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Jaxb2Adapter
public Jaxb2Adapter()
- Creates a instance of this adapter with an empty binding using jaxb.properties and Configuration.xml from
de.netseeker.ejoe.adapter.jaxb
Jaxb2Adapter
public Jaxb2Adapter(java.lang.String packagePath)
- Parameters:
packagePath
- A colon separated path of package names where to look for jaxb.properties files. The package
names must match the generated classes which you are going to use in your application.
read
public java.lang.Object read(java.io.InputStream in)
throws java.lang.Exception
- Description copied from interface:
SerializeAdapter
- Deserializes an object out of an given InputStream
- Parameters:
in
- the input stream to use for deserialization
- Returns:
- a deserialized object instance
- Throws:
java.lang.Exception
write
public void write(java.lang.Object obj,
java.io.OutputStream out)
throws java.lang.Exception
- Description copied from interface:
SerializeAdapter
- Serializes an object into an output stream
- Parameters:
obj
- object that should get serializedout
- the outputstream into which the object should serialized
- Throws:
java.lang.Exception
handleClassLoaderChange
public void handleClassLoaderChange(java.lang.ClassLoader classLoader)
- Description copied from interface:
SerializeAdapter
- Signals a change of the ContextClassLoader of the current thread to the adapter. This method will be called when
the EJOE client is started with support for remote classloading.
- Specified by:
handleClassLoaderChange
in interface SerializeAdapter
- Overrides:
handleClassLoaderChange
in class BaseAdapter
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface SerializeAdapter
- Overrides:
getContentType
in class BaseAdapter
- Returns:
- A recognized mime type
- See Also:
- mime type list of IANA
Copyright © 2005-2007 netseeker. All Rights Reserved.