public abstract class AbstractMarshaller extends Object implements Marshaller
Modifier and Type | Field and Description |
---|---|
protected Configuration |
configuration |
protected ClassLoader |
defaultClassLoader |
protected boolean |
defaultInactive |
protected org.apache.commons.logging.Log |
log |
protected RegionManager |
regionManager |
protected boolean |
trace |
protected boolean |
useRefs |
protected boolean |
useRegionBasedMarshalling |
Constructor and Description |
---|
AbstractMarshaller() |
Modifier and Type | Method and Description |
---|---|
protected Fqn |
extractFqn(ReplicableCommand cmd) |
protected void |
init() |
protected void |
initLogger() |
Object |
objectFromByteBuffer(byte[] bytes) |
Object |
objectFromByteBuffer(byte[] bytes,
int offset,
int len) |
Object |
objectFromStream(InputStream in)
Unmarshalls an object from an
InputStream |
ByteBuffer |
objectToBuffer(Object o)
A specialized form of
RpcDispatcher.Marshaller2.objectToBuffer(Object) that returns an instance
of ByteBuffer instead of Buffer . |
byte[] |
objectToByteBuffer(Object obj) |
RegionalizedMethodCall |
regionalizedMethodCallFromByteBuffer(byte[] buffer)
Returns a RegionalizedMethodCall from a byte buffer.
|
RegionalizedMethodCall |
regionalizedMethodCallFromObjectStream(ObjectInputStream in)
Returns a RegionalizedMethodCall from an object input stream.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
objectFromObjectStream, objectToObjectStream, objectToObjectStream
protected boolean useRegionBasedMarshalling
protected RegionManager regionManager
protected boolean defaultInactive
protected org.apache.commons.logging.Log log
protected boolean trace
protected Configuration configuration
protected ClassLoader defaultClassLoader
protected boolean useRefs
protected void init()
protected void initLogger()
public byte[] objectToByteBuffer(Object obj) throws Exception
objectToByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
Exception
public ByteBuffer objectToBuffer(Object o) throws Exception
Marshaller
RpcDispatcher.Marshaller2.objectToBuffer(Object)
that returns an instance
of ByteBuffer
instead of Buffer
.objectToBuffer
in interface Marshaller
objectToBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
o
- object to marshallException
public Object objectFromByteBuffer(byte[] bytes) throws Exception
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller
Exception
public Object objectFromByteBuffer(byte[] bytes, int offset, int len) throws Exception
objectFromByteBuffer
in interface org.jgroups.blocks.RpcDispatcher.Marshaller2
Exception
public Object objectFromStream(InputStream in) throws Exception
Marshaller
InputStream
objectFromStream
in interface Marshaller
in
- stream to unmarshall fromException
public RegionalizedMethodCall regionalizedMethodCallFromByteBuffer(byte[] buffer) throws Exception
Marshaller
RpcDispatcher.Marshaller.objectFromByteBuffer(byte[])
regionalizedMethodCallFromByteBuffer
in interface Marshaller
buffer
- byte bufferException
- if there are issuespublic RegionalizedMethodCall regionalizedMethodCallFromObjectStream(ObjectInputStream in) throws Exception
Marshaller
Marshaller.objectFromObjectStream(java.io.ObjectInputStream)
regionalizedMethodCallFromObjectStream
in interface Marshaller
in
- object inout streamException
- if there are issuesprotected Fqn extractFqn(ReplicableCommand cmd)
Copyright © 2012 JBoss, a division of Red Hat. All Rights Reserved.