org.jboss.cache.marshall
Class AbstractMarshaller
java.lang.Object
org.jboss.cache.marshall.AbstractMarshaller
- All Implemented Interfaces:
- Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller, org.jgroups.blocks.RpcDispatcher.Marshaller2
- Direct Known Subclasses:
- CacheMarshaller200, VersionAwareMarshaller
public abstract class AbstractMarshaller
- extends Object
- implements Marshaller
Abstract AbstractMarshaller for JBoss Cache.
- Author:
- Manik Surtani (manik@jboss.org)
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useRegionBasedMarshalling
protected boolean useRegionBasedMarshalling
regionManager
protected RegionManager regionManager
defaultInactive
protected boolean defaultInactive
log
protected org.apache.commons.logging.Log log
trace
protected boolean trace
configuration
protected Configuration configuration
defaultClassLoader
protected ClassLoader defaultClassLoader
useRefs
protected boolean useRefs
AbstractMarshaller
public AbstractMarshaller()
init
protected void init()
initLogger
protected void initLogger()
objectFromStream
public Object objectFromStream(InputStream in)
throws Exception
- Description copied from interface:
Marshaller
- Unmarshalls an object from an
InputStream
- Specified by:
objectFromStream in interface Marshaller
- Parameters:
in - stream to unmarshall from
- Returns:
- Object from stream passed in.
- Throws:
Exception
regionalizedMethodCallFromByteBuffer
public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer)
throws Exception
- Description copied from interface:
Marshaller
- Returns a RegionalizedMethodCall from a byte buffer. Only use if you know that the byte buffer contains a
MethodCall and that you are using region-based marshalling, otherwise use
RpcDispatcher.Marshaller.objectFromByteBuffer(byte[])
- Specified by:
regionalizedMethodCallFromByteBuffer in interface Marshaller
- Parameters:
buffer - byte buffer
- Returns:
- a RegionalizedMethodCall
- Throws:
Exception - if there are issues
regionalizedMethodCallFromObjectStream
public RegionalizedMethodCall regionalizedMethodCallFromObjectStream(ObjectInputStream in)
throws Exception
- Description copied from interface:
Marshaller
- Returns a RegionalizedMethodCall from an object input stream. Only use if you know that the byte buffer contains a
MethodCall and that you are using region-based marshalling, otherwise use
Marshaller.objectFromObjectStream(java.io.ObjectInputStream)
- Specified by:
regionalizedMethodCallFromObjectStream in interface Marshaller
- Parameters:
in - object inout stream
- Returns:
- a RegionalizedMethodCall
- Throws:
Exception - if there are issues
objectToBuffer
public ByteBuffer objectToBuffer(Object o)
throws Exception
- Specified by:
objectToBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
- Throws:
Exception
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes)
throws Exception
- Specified by:
objectFromByteBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
Exception
objectFromByteBuffer
public Object objectFromByteBuffer(byte[] bytes,
int offset,
int len)
throws Exception
- Specified by:
objectFromByteBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
- Throws:
Exception
objectToByteBuffer
public byte[] objectToByteBuffer(Object obj)
throws Exception
- Specified by:
objectToByteBuffer in interface org.jgroups.blocks.RpcDispatcher.Marshaller
- Throws:
Exception
extractFqn
protected Fqn extractFqn(ReplicableCommand cmd)
Copyright © 2009 JBoss, a division of Red Hat. All Rights Reserved.