[jboss-svn-commits] JBL Code SVN: r21082 - in labs/jbossesb/workspace/skeagh: runtime/src/main/java/org/jboss/esb/serialization and 4 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jul 17 08:14:40 EDT 2008


Author: tfennelly
Date: 2008-07-17 08:14:40 -0400 (Thu, 17 Jul 2008)
New Revision: 21082

Modified:
   labs/jbossesb/workspace/skeagh/jbossesb_checkstyle_checks.xml
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/SerializationException.java
   labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/Serializer.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/DeploymentContext.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/ESBContext.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/InvocationContext.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/InvocationParameters.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/ServiceInvoker.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/message/Message.java
   labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/service/ServiceName.java
Log:
More checkstyle configs and fixes.  All code passing now :-)

Modified: labs/jbossesb/workspace/skeagh/jbossesb_checkstyle_checks.xml
===================================================================
--- labs/jbossesb/workspace/skeagh/jbossesb_checkstyle_checks.xml	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/jbossesb_checkstyle_checks.xml	2008-07-17 12:14:40 UTC (rev 21082)
@@ -113,8 +113,12 @@
         <module name="ParenPad"/>
         <module name="TypecastParenPad"/>
         <module name="TabCharacter"/>
-        <module name="WhitespaceAfter"/>
-        <module name="WhitespaceAround"/>
+        <module name="WhitespaceAfter">
+            <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE"/>
+        </module>
+        <module name="WhitespaceAround">
+            <property name="tokens" value="ASSIGN, BAND, BAND_ASSIGN, BOR, BOR_ASSIGN, BSR, BSR_ASSIGN, BXOR, BXOR_ASSIGN, COLON, DIV, DIV_ASSIGN, EQUAL, GE, GT, LAND, LCURLY, LE, LITERAL_ASSERT, LITERAL_CATCH, LITERAL_DO, LITERAL_ELSE, LITERAL_FINALLY, LITERAL_FOR, LITERAL_IF, LITERAL_RETURN, LITERAL_SYNCHRONIZED, LITERAL_TRY, LITERAL_WHILE, LOR, LT, MINUS, MINUS_ASSIGN, MOD, MOD_ASSIGN, NOT_EQUAL, PLUS, PLUS_ASSIGN, QUESTION, RCURLY, SL, SLIST, SL_ASSIGN, SR, SR_ASSIGN, STAR, STAR_ASSIGN, TYPE_EXTENSION_AND, WILDCARD_TYPE"/>
+        </module>
 
 
         <!-- Modifier Checks                                    -->
@@ -141,7 +145,10 @@
         <!-- MY FAVOURITE -->
         <module name="EmptyStatement"/>
         <module name="EqualsHashCode"/>
-        <module name="HiddenField"/>
+        <module name="HiddenField">
+            <property name="ignoreSetter" value="true"/>
+            <property name="ignoreConstructorParameter" value="true"/>
+        </module>
         <module name="IllegalInstantiation"/>
         <module name="InnerAssignment"/>
         <module name="MagicNumber"/>
@@ -167,7 +174,7 @@
             <property name="format" value="\s+$"/>
             <property name="message" value="Line has trailing spaces."/>
         </module>
-        <module name="TodoComment"/>
+        <!-- module name="TodoComment"/ -->
         <module name="UpperEll"/>
 
     </module>

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/SerializationException.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/SerializationException.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/SerializationException.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -30,12 +30,21 @@
 public class SerializationException extends Exception
 {
 
-    public SerializationException(String message)
+    /**
+     * Public constructor.
+     * @param message The message.
+     */
+    public SerializationException(final String message)
     {
         super(message);
     }
 
-    public SerializationException(String message, Throwable cause)
+    /**
+     * Public constructor.
+     * @param message The message.
+     * @param cause The cause.
+     */
+    public SerializationException(final String message, final Throwable cause)
     {
         super(message, cause);
     }

Modified: labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/Serializer.java
===================================================================
--- labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/Serializer.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/runtime/src/main/java/org/jboss/esb/serialization/Serializer.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -21,6 +21,9 @@
 
 import org.jboss.esb.message.Message;
 
+import java.io.InputStream;
+import java.io.OutputStream;
+
 /**
  * Message Serialization/Deserialization.
  *
@@ -32,7 +35,19 @@
 public interface Serializer
 {
 
-    public byte[] marshal(Message messageObject) throws SerializationException;
+    /**
+     * Serialize the supplied {@link Message} to the supplied {@link OutputStream}.
+     * @param message The Message.
+     * @param outStream The OutputStream.
+     * @throws SerializationException Failed to serialize message.
+     */
+    void serialize(Message message, OutputStream outStream) throws SerializationException;
 
-    public Message unmarshal(byte[] messageBytes) throws SerializationException;
+    /**
+     * Deserialize the {@link Message} from the supplied {@link InputStream}.
+     * @param messageStream The InputStream.
+     * @return The Message.
+     * @throws SerializationException Failed to deserialize message.
+     */
+    Message deserialize(InputStream messageStream) throws SerializationException;
 }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/DeploymentContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/DeploymentContext.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/DeploymentContext.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -36,24 +36,45 @@
 public class DeploymentContext implements ESBContext
 {
 
+    /**
+     * Context Data Map.
+     */
     private Map<Object, Object> contextMap = new LinkedHashMap<Object, Object>();
 
+    /**
+     * Get the {@link DeploymentContext} associated with the caller.
+     * @return The {@link DeploymentContext} associated with the caller.
+     */
     public static DeploymentContext getDeploymentContext()
     {
         return null;
     }
 
-    public Object get(Object key)
+    /**
+     * Get the Object from the context using the supplied key.
+     * @param key The context key.
+     * @return The Object bound under the supplied context key, otherwise false.
+     */
+    public final Object get(final Object key)
     {
         return contextMap.get(key);
     }
 
-    public void set(Object key, Object value)
+    /**
+     * Set the value Object into the context using the supplied key.
+     * @param key The context key.
+     * @param value The value object to be set in the context.
+     */
+    public final void set(final Object key, final Object value)
     {
         contextMap.put(key, value);
     }
 
-    public Map<Object, Object> getAll()
+    /**
+     * Get the context Map.
+     * @return The context Map.
+     */
+    public final Map<Object, Object> getAll()
     {
         return contextMap;
     }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/ESBContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/ESBContext.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/ESBContext.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -39,7 +39,7 @@
      * @return The Object instance, or null if the Object is not bound to the
      *         context instance.
      */
-    public Object get(final Object key);
+    Object get(final Object key);
 
     /**
      * Set an object on the context.
@@ -47,12 +47,12 @@
      * @param key   The context object key.
      * @param value The object instance.
      */
-    public void set(final Object key, final Object value);
+    void set(final Object key, final Object value);
 
     /**
      * Get all the context objects.
      *
      * @return The context Map.
      */
-    public Map<Object, Object> getAll();
+    Map<Object, Object> getAll();
 }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/InvocationContext.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/InvocationContext.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/context/InvocationContext.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -37,24 +37,47 @@
 public class InvocationContext implements ESBContext
 {
 
+    /**
+     * Context Data Map.
+     */
     private Map<Object, Object> contextMap = new LinkedHashMap<Object, Object>();
 
+    /**
+     * Get the {@link InvocationContext} associated with the message currently
+     * being processed.
+     * @return The {@link InvocationContext} associated with the message currently
+     * being processed.
+     */
     public static InvocationContext getInvocationContext()
     {
         return null;
     }
 
-    public Object get(Object key)
+    /**
+     * Get the Object from the context using the supplied key.
+     * @param key The context key.
+     * @return The Object bound under the supplied context key, otherwise false.
+     */
+    public final Object get(final Object key)
     {
         return contextMap.get(key);
     }
 
-    public void set(Object key, Object value)
+    /**
+     * Set the value Object into the context using the supplied key.
+     * @param key The context key.
+     * @param value The value object to be set in the context.
+     */
+    public final void set(final Object key, final Object value)
     {
         contextMap.put(key, value);
     }
 
-    public Map<Object, Object> getAll()
+    /**
+     * Get the context Map.
+     * @return The context Map.
+     */
+    public final Map<Object, Object> getAll()
     {
         return contextMap;
     }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/InvocationParameters.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/InvocationParameters.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/InvocationParameters.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -43,19 +43,35 @@
 public class InvocationParameters
 {
 
+    /**
+     * Invocation Parameters.
+     */
     private Map<String, Object> parameters = new LinkedHashMap<String, Object>();
 
-    public InvocationParameters(Map<String, Object> parameters)
+    /**
+     * Public constructor.
+     * @param parameters The invocation parameters.
+     */
+    public InvocationParameters(final Map<String, Object> parameters)
     {
         this.parameters = parameters;
     }
 
-    public Object getParameter(String name)
+    /**
+     * Get the named invocation parameter value.
+     * @param name The name of the invocation parameter.
+     * @return The invocation parameter value, or null if not specified.
+     */
+    public final Object getParameter(final String name)
     {
         return parameters.get(name);
     }
 
-    public Map<String, Object> getParameters()
+    /**
+     * Get the parameter Map.
+     * @return The parameter Map.
+     */
+    public final Map<String, Object> getParameters()
     {
         return parameters;
     }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/ServiceInvoker.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/ServiceInvoker.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/invocation/ServiceInvoker.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -32,18 +32,36 @@
  */
 public class ServiceInvoker
 {
-
+    /**
+     * Get the ServiceInvoker instance for the deployment.
+     * @return The ServiceInvoker instance.
+     */
     public static ServiceInvoker getServiceInvoker()
     {
         return null;
     }
 
-    public void send(final ServiceName name, final Message message, final ServiceName responseName)
+    /**
+     * Send the supplied message to the specified Service.
+     * <p/>
+     * Supports an asynchronous replyTo.
+     *
+     * @param message The message to be sent.
+     * @param to The Service to which the message is to be sent.
+     * @param replyTo The Service to which the reply should be sent.
+     */
+    public void send(final Message message, final ServiceName to, final ServiceName replyTo)
     {
 
     }
 
-    public void sendOneWay(final ServiceName name, final Message message)
+    /**
+     * Send the supplied message to the specified Service.
+     *
+     * @param message The message to be sent.
+     * @param to The Service to which the message is to be sent.
+     */
+    public void sendOneWay(final Message message, final ServiceName to)
     {
 
     }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/message/Message.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/message/Message.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/message/Message.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -36,7 +36,13 @@
 public class Message
 {
 
+    /**
+     * Primary Payload.
+     */
     private Object payload;
+    /**
+     * Attachments.
+     */
     private Map<String, Object> attachments = new LinkedHashMap<String, Object>();
 
     /**
@@ -44,7 +50,7 @@
      *
      * @return The primary payload Object.
      */
-    public Object getPayload()
+    public final Object getPayload()
     {
         return payload;
     }
@@ -54,7 +60,7 @@
      *
      * @param payload The primary payload Object.
      */
-    public void setPayload(Object payload)
+    public final void setPayload(final Object payload)
     {
         this.payload = payload;
     }
@@ -64,7 +70,7 @@
      *
      * @return Message attachments.
      */
-    public Map<String, Object> getAttachments()
+    public final Map<String, Object> getAttachments()
     {
         return attachments;
     }
@@ -74,7 +80,7 @@
      *
      * @param attachments Message attachments.
      */
-    public void setAttachments(Map<String, Object> attachments)
+    public final void setAttachments(final Map<String, Object> attachments)
     {
         this.attachments = attachments;
     }

Modified: labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/service/ServiceName.java
===================================================================
--- labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/service/ServiceName.java	2008-07-17 10:05:37 UTC (rev 21081)
+++ labs/jbossesb/workspace/skeagh/service-api/src/main/java/org/jboss/esb/service/ServiceName.java	2008-07-17 12:14:40 UTC (rev 21082)
@@ -30,21 +30,40 @@
 public class ServiceName
 {
 
+    /**
+     * Service Category.
+     */
     private final String category;
+    /**
+     * Service Name.
+     */
     private final String name;
 
+    /**
+     * Public constructor.
+     * @param category Service Category.
+     * @param name Service Name.
+     */
     public ServiceName(final String category, final String name)
     {
         this.category = category;
         this.name = name;
     }
 
-    public String getCategory()
+    /**
+     * Get the Service Category.
+     * @return Service Category.
+     */
+    public final String getCategory()
     {
         return category;
     }
 
-    public String getName()
+    /**
+     * Get the Service Name.
+     * @return The Service Name.
+     */
+    public final String getName()
     {
         return name;
     }




More information about the jboss-svn-commits mailing list