de.netseeker.ejoe.adapter
Class BaseAdapter
java.lang.Object
de.netseeker.ejoe.adapter.BaseAdapter
- All Implemented Interfaces:
- SerializeAdapter, java.io.Serializable
- Direct Known Subclasses:
- BetwixtAdapter, CastorAdapter, HessianAdapter, JavaBeansXmlAdapter, JavolutionAdapter, Jaxb2Adapter, JSXAdapter, ObjectStreamAdapter, SkaringaAdapter, SojoAdapter, UTF8StringAdapter, XmlBeansAdapter, XStreamAdapter
public abstract class BaseAdapter
- extends java.lang.Object
- implements SerializeAdapter
Abstract base class for SerializeAdapter implementations. This class provides default settings for
SerializeAdapter.handleClassLoaderChange(ClassLoader)
, SerializeAdapter.isSelfBuffered()
and
SerializeAdapter.requiresCustomEOFHandling()
- Since:
- 0.3.9.1
- Author:
- netseeker
- See Also:
- Serialized Form
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. |
boolean |
isSelfBuffered()
Indicates that the adapter uses a StreamBuffer mechanism and doesn't require a buffered input stream |
boolean |
requiresCustomEOFHandling()
Signals if this adapter has problems with EJOE's UncloseableInputStreams and requires a really closed Stream
(which EJOE prevents to ensure that an adapter can not close the underlying socket unintentionally). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BaseAdapter
public BaseAdapter()
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
isSelfBuffered
public boolean isSelfBuffered()
- Description copied from interface:
SerializeAdapter
- Indicates that the adapter uses a StreamBuffer mechanism and doesn't require a buffered input stream
- Specified by:
isSelfBuffered
in interface SerializeAdapter
- Returns:
- true if the adapter doesn't require a buffered inputstream, otherwise false
requiresCustomEOFHandling
public boolean requiresCustomEOFHandling()
- Description copied from interface:
SerializeAdapter
- Signals if this adapter has problems with EJOE's UncloseableInputStreams and requires a really closed Stream
(which EJOE prevents to ensure that an adapter can not close the underlying socket unintentionally). If the
adapter requires closed streams, EJOE will append a custom EOF signature at the end of the stream and return -1
in Inputstream#read when EOF is reached.
- Specified by:
requiresCustomEOFHandling
in interface SerializeAdapter
- Returns:
- true if the adapter requires EOF to detect the end of the stream
- See Also:
- XMLEncoder/Decoder over sockets
getContentType
public java.lang.String getContentType()
- Specified by:
getContentType
in interface SerializeAdapter
- Returns:
- A recognized mime type
- See Also:
- mime type list of IANA
Copyright © 2005-2007 netseeker. All Rights Reserved.