org.infinispan.marshall.jboss
Class ConstantObjectTable

java.lang.Object
  extended by org.infinispan.marshall.jboss.ConstantObjectTable
All Implemented Interfaces:
org.jboss.marshalling.ObjectTable

public class ConstantObjectTable
extends Object
implements org.jboss.marshalling.ObjectTable

Constant ObjectTable that marshalls constant instances regardless of whether these are generic objects such as UnsuccessfulResponse.INSTANCE, or home grown Externalizer implementations. In both cases, this is a hugely efficient way of sending around constant singleton objects.

Since:
4.0
Author:
Galder ZamarreƱo

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.marshalling.ObjectTable
org.jboss.marshalling.ObjectTable.Writer
 
Constructor Summary
ConstantObjectTable()
           
 
Method Summary
 org.jboss.marshalling.ObjectTable.Writer getObjectWriter(Object o)
           
 Object readObject(org.jboss.marshalling.Unmarshaller input)
           
 void start(RemoteCommandsFactory cmdFactory, Marshaller ispnMarshaller)
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstantObjectTable

public ConstantObjectTable()
Method Detail

start

public void start(RemoteCommandsFactory cmdFactory,
                  Marshaller ispnMarshaller)

stop

public void stop()

getObjectWriter

public org.jboss.marshalling.ObjectTable.Writer getObjectWriter(Object o)
                                                         throws IOException
Specified by:
getObjectWriter in interface org.jboss.marshalling.ObjectTable
Throws:
IOException

readObject

public Object readObject(org.jboss.marshalling.Unmarshaller input)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readObject in interface org.jboss.marshalling.ObjectTable
Throws:
IOException
ClassNotFoundException

Google Analytics

Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.