[jboss-remoting-commits] JBoss Remoting SVN: r5496 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.

jboss-remoting-commits at lists.jboss.org jboss-remoting-commits at lists.jboss.org
Wed Sep 16 11:39:14 EDT 2009


Author: david.lloyd at jboss.com
Date: 2009-09-16 11:39:14 -0400 (Wed, 16 Sep 2009)
New Revision: 5496

Modified:
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java
   remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java
Log:
Add more convenience options for option maps

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java	2009-09-16 15:38:45 UTC (rev 5495)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java	2009-09-16 15:39:14 UTC (rev 5496)
@@ -117,6 +117,42 @@
         }
 
         /**
+         * Add an int value to an Integer key.
+         *
+         * @param key the option
+         * @param value the value
+         * @return this builder
+         */
+        public Builder add(Option<Integer> key, int value) {
+            list.add(new OVPair<Integer>(key, Integer.valueOf(value)));
+            return this;
+        }
+
+        /**
+         * Add a long value to a Long key.
+         *
+         * @param key the option
+         * @param value the value
+         * @return this builder
+         */
+        public Builder add(Option<Long> key, long value) {
+            list.add(new OVPair<Long>(key, Long.valueOf(value)));
+            return this;
+        }
+
+        /**
+         * Add a boolean value to a Boolean key.
+         *
+         * @param key the option
+         * @param value the value
+         * @return this builder
+         */
+        public Builder add(Option<Boolean> key, boolean value) {
+            list.add(new OVPair<Boolean>(key, Boolean.valueOf(value)));
+            return this;
+        }
+
+        /**
          * Add a key-value pair, where the value is a sequence type.
          *
          * @param key the key

Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java	2009-09-16 15:38:45 UTC (rev 5495)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java	2009-09-16 15:39:14 UTC (rev 5496)
@@ -32,7 +32,7 @@
 
     /**
      * Request that the marshalling layer require the use of one of the listed marshalling protocols, in order of decreasing preference.  If
-     * not specified, use a default value.
+     * not specified, use a default value.  The marshaller {@code "default"} can be specified explicitly for this default value.
      */
     public static final Option<Sequence<String>> MARSHALLING_PROTOCOLS = Option.sequence("jboss.remoting3.marshalling.protocols", String.class);
 



More information about the jboss-remoting-commits mailing list