JBoss Marshalling 1.3.0.CR9

org.jboss.marshalling
Interface ClassTable

All Known Implementing Classes:
ChainingClassTable, ModularClassTable

public interface ClassTable

A lookup mechanism for predefined classes. Some marshallers can use this to avoid sending lengthy class descriptor information.


Nested Class Summary
static interface ClassTable.Writer
          The class writer for a specific class.
 
Method Summary
 ClassTable.Writer getClassWriter(Class<?> clazz)
          Determine whether the given class reference is a valid predefined reference.
 Class<?> readClass(Unmarshaller unmarshaller)
          Read a class from the stream.
 

Method Detail

getClassWriter

ClassTable.Writer getClassWriter(Class<?> clazz)
                                 throws IOException
Determine whether the given class reference is a valid predefined reference.

Parameters:
clazz - the candidate class
Returns:
the class writer, or null to use the default mechanism
Throws:
IOException - if an I/O error occurs

readClass

Class<?> readClass(Unmarshaller unmarshaller)
                   throws IOException,
                          ClassNotFoundException
Read a class from the stream. The class will have been written by the getClassWriter(Class) method's Writer instance, as defined above.

Parameters:
unmarshaller - the unmarshaller to read from
Returns:
the class
Throws:
IOException - if an I/O error occurs
ClassNotFoundException - if a class could not be found

JBoss Marshalling 1.3.0.CR9

Copyright © 2011 JBoss, a division of Red Hat, Inc.