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(RemoteCommandFactory cmdFactory)
           
 
Method Summary
 org.jboss.marshalling.ObjectTable.Writer getObjectWriter(Object o)
           
 void init()
           
 Object readObject(org.jboss.marshalling.Unmarshaller unmarshaller)
           
 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(RemoteCommandFactory cmdFactory)
Method Detail

init

public void init()

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 unmarshaller)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readObject in interface org.jboss.marshalling.ObjectTable
Throws:
IOException
ClassNotFoundException


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