Author: noctarius
Date: Sun Oct 14 13:09:56 2012
New Revision: 1398079

URL: http://svn.apache.org/viewvc?rev=1398079&view=rev
Log:
Added javadoc to the Marshaller interface

Modified:
    
directmemory/lightning/trunk/lightning-api/src/main/java/org/apache/directmemory/lightning/Marshaller.java

Modified: 
directmemory/lightning/trunk/lightning-api/src/main/java/org/apache/directmemory/lightning/Marshaller.java
URL: 
http://svn.apache.org/viewvc/directmemory/lightning/trunk/lightning-api/src/main/java/org/apache/directmemory/lightning/Marshaller.java?rev=1398079&r1=1398078&r2=1398079&view=diff
==============================================================================
--- 
directmemory/lightning/trunk/lightning-api/src/main/java/org/apache/directmemory/lightning/Marshaller.java
 (original)
+++ 
directmemory/lightning/trunk/lightning-api/src/main/java/org/apache/directmemory/lightning/Marshaller.java
 Sun Oct 14 13:09:56 2012
@@ -24,15 +24,43 @@ import java.io.IOException;
 
 import org.apache.directmemory.lightning.metadata.PropertyDescriptor;
 
+/**
+ * Implementations of the Marshaller interface are used to serialize / 
deserialize object instances. Normally marshaller
+ * implementations are autogenerated by Lightning using the descriptions given 
{@link AbstractSerializerDefinition}s.
+ */
 public interface Marshaller
 {
 
+    /**
+     * Checks if a given type can be (de-) serialized with this marshaller 
implementation.
+     * 
+     * @param type The type to check for being serializable by this marshaller
+     * @return true if the type can be (de-) serialized by this marshaller 
otherwise it returns false
+     */
     boolean acceptType( Class<?> type );
 
+    /**
+     * Marshalls (serializes) an given object instance of a supported type, 
previously checked by acceptType.
+     * 
+     * @param value Object instance to serialize
+     * @param propertyDescriptor The {@link PropertyDescriptor} of this object
+     * @param dataOutput The {@link DataOutput} implementation to write to
+     * @param serializationContext The {@link SerializationContext} used to 
serialize this object graph
+     * @throws IOException Throws {@link IOException} if any exception occurs 
while writing to the {@link DataOutput}
+     */
     void marshall( Object value, PropertyDescriptor propertyDescriptor, 
DataOutput dataOutput,
                    SerializationContext serializationContext )
         throws IOException;
 
+    /**
+     * Unmarshalls (deserializes) an object from the given {@link DataInput}.
+     * 
+     * @param propertyDescriptor The {@link PropertyDescriptor} of this object
+     * @param dataInput The {@link DataInput} implementation to read from
+     * @param serializationContext The {@link SerializationContext} used to 
deserialize this object graph
+     * @return An object read from the given {@link DataInput}
+     * @throws IOException Throws {@link IOException} if any exception occurs 
while reading from the {@link DataInput}
+     */
     <V> V unmarshall( PropertyDescriptor propertyDescriptor, DataInput 
dataInput,
                       SerializationContext serializationContext )
         throws IOException;


Reply via email to