You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directmemory.apache.org by no...@apache.org on 2012/10/14 22:12:12 UTC

svn commit: r1398124 - in /directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning: MarshallerContext.java MarshallerStrategy.java SerializationStrategy.java

Author: noctarius
Date: Sun Oct 14 20:12:12 2012
New Revision: 1398124

URL: http://svn.apache.org/viewvc?rev=1398124&view=rev
Log:
Some more javadoc

Modified:
    directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerContext.java
    directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerStrategy.java
    directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/SerializationStrategy.java

Modified: directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerContext.java
URL: http://svn.apache.org/viewvc/directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerContext.java?rev=1398124&r1=1398123&r2=1398124&view=diff
==============================================================================
--- directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerContext.java (original)
+++ directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerContext.java Sun Oct 14 20:12:12 2012
@@ -20,11 +20,26 @@ package org.apache.directmemory.lightnin
 
 import java.lang.reflect.Type;
 
+/**
+ * The MarshallerContext is used to collect all {@link Marshaller}s by type.
+ */
 public interface MarshallerContext
 {
 
+    /**
+     * Returns a {@link Marshaller} by given type.
+     * 
+     * @param type The type to search the {@link Marshaller} for
+     * @return The {@link Marshaller} implementation
+     */
     Marshaller getMarshaller( Type type );
 
+    /**
+     * Binds a new {@link Marshaller} implementation to the given type
+     * 
+     * @param type The type to bind the {@link Marshaller} to
+     * @param marshaller The {@link Marshaller} implementation to bind to the given type
+     */
     void bindMarshaller( Type type, Marshaller marshaller );
 
 }

Modified: directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerStrategy.java
URL: http://svn.apache.org/viewvc/directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerStrategy.java?rev=1398124&r1=1398123&r2=1398124&view=diff
==============================================================================
--- directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerStrategy.java (original)
+++ directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/MarshallerStrategy.java Sun Oct 14 20:12:12 2012
@@ -18,13 +18,36 @@
  */
 package org.apache.directmemory.lightning;
 
+import java.io.Serializable;
 import java.lang.reflect.Type;
 
+/**
+ * The MarshallerStrategy is used to find a marshaller for a given type in a {@link MarshallerContext}. This class is
+ * used internally for finding generated {@link Marshaller} implementations.
+ */
 public interface MarshallerStrategy
 {
 
+    /**
+     * Returns a {@link Marshaller} implementation found in the given {@link MarshallerContext} for type.
+     * 
+     * @param type The type to search with
+     * @param marshallerContext The {@link MarshallerContext} to search in
+     * @return The {@link Marshaller} implementation
+     */
     Marshaller getMarshaller( Type type, MarshallerContext marshallerContext );
 
+    /**
+     * Returns a {@link Marshaller} implementation found in the given {@link MarshallerContext} for type. If
+     * baseMarshallerOnly is set no {@link Serializable} {@link Marshaller} will be used in hope to find a more suitable
+     * one.
+     * 
+     * @param type The type to search with
+     * @param marshallerContext The {@link MarshallerContext} to search in
+     * @param baseMarshallersOnly If set to false the {@link Serializable} {@link Marshaller} implementation will be
+     *            skipped when searching for a suitable one
+     * @return The {@link Marshaller} implementation
+     */
     Marshaller getMarshaller( Type type, MarshallerContext marshallerContext, boolean baseMarshallersOnly );
 
 }

Modified: directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/SerializationStrategy.java
URL: http://svn.apache.org/viewvc/directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/SerializationStrategy.java?rev=1398124&r1=1398123&r2=1398124&view=diff
==============================================================================
--- directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/SerializationStrategy.java (original)
+++ directmemory/lightning/trunk/lightning-core/src/main/java/org/apache/directmemory/lightning/SerializationStrategy.java Sun Oct 14 20:12:12 2012
@@ -18,6 +18,9 @@
  */
 package org.apache.directmemory.lightning;
 
+/**
+ * The SerializationStrategy defines how Lightning will (de-) serialize objects from / into the datastream.
+ */
 public enum SerializationStrategy
 {