Author: david.lloyd(a)jboss.com
Date: 2009-09-16 00:13:30 -0400 (Wed, 16 Sep 2009)
New Revision: 5492
Added:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java
Removed:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceLocationListener.java
Modified:
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/UnwrappingRequestHandler.java
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/WrappingRequestHandler.java
remoting3/trunk/jboss-remoting/pom.xml
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Connection.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestCancelHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestListener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistration.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistrationListener.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicProtocol.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicRequestHandler.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerReplyTransmitter.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerRequestConsumer.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexServerExample.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StreamingRot13RequestListener.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StringRot13RequestListener.java
remoting3/trunk/samples/src/test/java/org/jboss/remoting3/samples/protocol/basic/BasicTestCase.java
remoting3/trunk/taglet/pom.xml
Log:
Make some changes to the service registration procedure; add javadocs
Modified:
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/UnwrappingRequestHandler.java
===================================================================
---
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/UnwrappingRequestHandler.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/UnwrappingRequestHandler.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -22,7 +22,6 @@
package org.jboss.remoting3.compat;
-import org.jboss.remoting3.spi.AbstractAutoCloseable;
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.RemoteRequestContext;
import org.jboss.remoting3.spi.ReplyHandler;
Modified:
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/WrappingRequestHandler.java
===================================================================
---
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/WrappingRequestHandler.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/compat/src/main/java/org/jboss/remoting3/compat/WrappingRequestHandler.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -25,7 +25,6 @@
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.RemoteRequestContext;
import org.jboss.remoting3.spi.ReplyHandler;
-import org.jboss.remoting3.spi.AbstractAutoCloseable;
import java.util.concurrent.Executor;
/**
Modified: remoting3/trunk/jboss-remoting/pom.xml
===================================================================
--- remoting3/trunk/jboss-remoting/pom.xml 2009-09-16 03:01:55 UTC (rev 5491)
+++ remoting3/trunk/jboss-remoting/pom.xml 2009-09-16 04:13:30 UTC (rev 5492)
@@ -29,7 +29,7 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
<packaging>jar</packaging>
- <version>1.1.0.CR1</version>
+ <version>3.1.0.CR1</version>
<dependencies>
<dependency>
<groupId>org.jboss.xnio</groupId>
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseHandler.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseHandler.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/CloseHandler.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -28,6 +28,7 @@
* @param <T> the type of resource
*
* @apiviz.exclude
+ * @remoting.implement
*/
public interface CloseHandler<T> {
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Connection.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Connection.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Connection.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -28,9 +28,7 @@
/**
* A connection to a remote peer.
* <p/>
- * This interface is part of the Remoting public API. It is intended to be consumed by
Remoting applications; it is
- * not intended to be implemented by them. Methods may be added to this interface in
future minor releases without
- * advance notice.
+ * @remoting.consume
*/
public interface Connection extends HandleableCloseable<Connection> {
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -172,8 +172,9 @@
}
final String serviceType = configuration.getServiceType();
final String groupName = configuration.getGroupName();
- final int metric = configuration.getMetric();
- if (metric < 0) {
+ final OptionMap optionMap = configuration.getOptionMap();
+ final Integer metric = optionMap.get(Options.METRIC);
+ if (metric != null && metric.intValue() < 0) {
throw new IllegalArgumentException("metric must be greater than or equal
to zero");
}
ServiceURI.validateServiceType(serviceType);
@@ -247,7 +248,7 @@
final ServiceRegistrationListener.ServiceInfo serviceInfo = new
ServiceRegistrationListener.ServiceInfo();
serviceInfo.setGroupName(groupName);
serviceInfo.setServiceType(serviceType);
- serviceInfo.setMetric(metric);
+ serviceInfo.setOptionMap(optionMap);
serviceInfo.setRegistrationHandle(newHandle);
serviceInfo.setRequestHandlerConnector(requestHandlerConnector);
executor.execute(new Runnable() {
@@ -324,7 +325,7 @@
for (ServiceRegistration service : services) {
final ServiceRegistrationListener.ServiceInfo serviceInfo = new
ServiceRegistrationListener.ServiceInfo();
serviceInfo.setGroupName(service.getGroupName());
- serviceInfo.setMetric(service.getMetric());
+ serviceInfo.setOptionMap(service.getOptionMap());
serviceInfo.setRegistrationHandle(service.getHandle());
serviceInfo.setRequestHandlerConnector(service.getConnector());
serviceInfo.setServiceType(service.getServiceType());
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -0,0 +1,149 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3;
+
+import java.util.AbstractSet;
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.Collections;
+import java.util.Collection;
+import java.io.Serializable;
+
+/**
+ * An immutable set of some enumeration type. Used to build immutable sets of flags for
flag options.
+ *
+ * @param <E> the element type
+ */
+public final class FlagSet<E extends Enum<E>> extends AbstractSet<E>
implements Serializable {
+
+ private final Class<E> type;
+ private final EnumSet<E> values;
+ private static final long serialVersionUID = 4155828678034140336L;
+
+ private FlagSet(final Class<E> type, final EnumSet<E> values) {
+ this.type = type;
+ this.values = values;
+ }
+
+ /**
+ * Create a flag set that is a copy of a given collection.
+ *
+ * @param elementType the element type
+ * @param original the original flag collection
+ * @param <E> the element type
+ * @return the flag set
+ */
+ public static <E extends Enum<E>> FlagSet<E> copyOf(Class<E>
elementType, Collection<E> original) {
+ return new FlagSet<E>(elementType, EnumSet.copyOf(original));
+ }
+
+ /**
+ * Create an empty flag set of a given type.
+ *
+ * @param elementType the element type
+ * @param <E> the element type
+ * @return the flag set
+ */
+ public static <E extends Enum<E>> FlagSet<E> noneOf(Class<E>
elementType) {
+ return new FlagSet<E>(elementType, EnumSet.noneOf(elementType));
+ }
+
+ /**
+ * Create a full flag set of a given type.
+ *
+ * @param elementType the element type
+ * @param <E> the element type
+ * @return the flag set
+ */
+ public static <E extends Enum<E>> FlagSet<E> allOf(Class<E>
elementType) {
+ return new FlagSet<E>(elementType, EnumSet.allOf(elementType));
+ }
+
+ /**
+ * Create a flag set of the given elements.
+ *
+ * @param elements the elements
+ * @param <E> the element type
+ * @return the flag set
+ */
+ @SuppressWarnings({ "unchecked" })
+ public static <E extends Enum<E>> FlagSet<E> of(E... elements) {
+ if (elements.length == 0) {
+ throw new IllegalArgumentException("Empty elements array");
+ }
+ Class elementType = elements[0].getClass();
+ while (elementType.getSuperclass() != Enum.class) elementType =
elementType.getSuperclass();
+ return new FlagSet<E>((Class<E>)elementType,
EnumSet.<E>of(elements[0], elements));
+ }
+
+ /**
+ * Get the element type for this flag set.
+ *
+ * @return the element type
+ */
+ public Class<E> getElementType() {
+ return type;
+ }
+
+ /**
+ * Cast this flag set to a flag set of the given element type.
+ *
+ * @param type the element type
+ * @param <N> the element type
+ * @return this flag set
+ * @throws ClassCastException if the elements of this flag set are not of the given
type
+ */
+ @SuppressWarnings({ "unchecked" })
+ public <N extends Enum<N>> FlagSet<N> cast(Class<N> type)
throws ClassCastException {
+ this.type.asSubclass(type);
+ return (FlagSet<N>) this;
+ }
+
+ /**
+ * Determine if this flag set contains the given value.
+ *
+ * @param o the value
+ * @return {@code true} if the value is within this set
+ */
+ public boolean contains(final Object o) {
+ return values.contains(o);
+ }
+
+ /**
+ * Get an iterator over this flag set.
+ *
+ * @return an iterator
+ */
+ public Iterator<E> iterator() {
+ return Collections.unmodifiableSet(values).iterator();
+ }
+
+ /**
+ * Get the number of elements in this flag set.
+ *
+ * @return the number of elements
+ */
+ public int size() {
+ return values.size();
+ }
+}
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -33,7 +33,7 @@
private final Class<O> replyClass;
private String serviceType;
private String groupName;
- private int metric;
+ private OptionMap optionMap = OptionMap.EMPTY;
/**
* Construct a new instance.
@@ -112,20 +112,23 @@
}
/**
- * Get the metric.
+ * Get the option map for the service.
*
- * @return the metric
+ * @return the option map
*/
- public int getMetric() {
- return metric;
+ public OptionMap getOptionMap() {
+ return optionMap;
}
/**
- * Set the metric.
+ * Set the option map for the service.
*
- * @param metric the metric
+ * @param optionMap the option map
*/
- public void setMetric(final int metric) {
- this.metric = metric;
+ public void setOptionMap(final OptionMap optionMap) {
+ if (optionMap == null) {
+ throw new NullPointerException("optionMap is null");
+ }
+ this.optionMap = optionMap;
}
}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3;
+
+/**
+ * A strongly-typed option to configure an aspect of a service. Options are immutable
and use identity comparisons
+ * and hash codes, and they are not serializable.
+ *
+ * @param <T> the option value type
+ */
+public abstract class Option<T> {
+
+ private final String name;
+
+ Option(final String name) {
+ if (name == null) {
+ throw new NullPointerException("name is null");
+ }
+ this.name = name;
+ }
+
+ /**
+ * Create an option with a simple type. The class object given
<b>must</b> represent some immutable type, otherwise
+ * unexpected behavior may result.
+ *
+ * @param name the name of this option
+ * @param type the class of the value associated with this option
+ * @param <T> the type of the value associated with this option
+ * @return the option instance
+ */
+ public static <T> Option<T> simple(final String name, final
Class<T> type) {
+ return new SingleOption<T>(name, type);
+ }
+
+ /**
+ * Create an option with a sequence type. The class object given
<b>must</b> represent some immutable type, otherwise
+ * unexpected behavior may result.
+ *
+ * @param name the name of this option
+ * @param elementType the class of the sequence element value associated with this
option
+ * @param <T> the type of the sequence element value associated with this
option
+ * @return the option instance
+ */
+ public static <T> Option<Sequence<T>> sequence(final String name,
final Class<T> elementType) {
+ return new SequenceOption<T>(name, elementType);
+ }
+
+ /**
+ * Create an option with a flag set type. The class object given
<b>must</b> represent some immutable type, otherwise
+ * unexpected behavior may result.
+ *
+ * @param name the name of this option
+ * @param elementType the class of the flag values associated with this option
+ * @param <T> the type of the flag values associated with this option
+ * @return the option instance
+ */
+ public static <T extends Enum<T>> Option<FlagSet<T>>
flags(final String name, final Class<T> elementType) {
+ return new FlagsOption<T>(name, elementType);
+ }
+
+ /**
+ * Get the name of this option.
+ *
+ * @return the option name
+ */
+ public String getName() {
+ return name;
+ }
+
+ /**
+ * Return the given object as the type of this option. If the cast could not be
completed, an exception is thrown.
+ *
+ * @param o the object to cast
+ * @return the cast object
+ * @throws ClassCastException if the object is not of a compatible type
+ */
+ public abstract T cast(Object o) throws ClassCastException;
+}
+
+final class SingleOption<T> extends Option<T> {
+
+ private final Class<T> type;
+
+ SingleOption(final String name, final Class<T> type) {
+ super(name);
+ this.type = type;
+ }
+
+ public T cast(final Object o) {
+ return type.cast(o);
+ }
+}
+
+final class SequenceOption<T> extends Option<Sequence<T>> {
+ private final Class<T> elementType;
+
+ SequenceOption(final String name, final Class<T> elementType) {
+ super(name);
+ this.elementType = elementType;
+ }
+
+ public Sequence<T> cast(final Object o) {
+ return ((Sequence<?>)o).cast(elementType);
+ }
+}
+
+final class FlagsOption<T extends Enum<T>> extends
Option<FlagSet<T>> {
+
+ private final Class<T> elementType;
+
+ FlagsOption(final String name, final Class<T> elementType) {
+ super(name);
+ this.elementType = elementType;
+ }
+
+ public FlagSet<T> cast(final Object o) throws ClassCastException {
+ final FlagSet<?> flagSet = (FlagSet<?>) o;
+ return flagSet.cast(elementType);
+ }
+}
\ No newline at end of file
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -0,0 +1,203 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.Collections;
+import java.util.IdentityHashMap;
+
+/**
+ * An immutable map of options to option values. No {@code null} keys or values are
permitted.
+ */
+public final class OptionMap implements Iterable<Option<?>> {
+
+ private final Map<Option<?>, Object> value;
+
+ private OptionMap(final Map<Option<?>, Object> value) {
+ this.value = value;
+ }
+
+ /**
+ * Get the value of an option from this option map.
+ *
+ * @param option the option to get
+ * @param <T> the type of the option
+ * @return the option value, or {@code null} if it is not present
+ */
+ <T> T get(Option<T> option) {
+ return option.cast(value.get(option));
+ }
+
+ /**
+ * Iterate over the options in this map.
+ *
+ * @return an iterator over the options
+ */
+ public Iterator<Option<?>> iterator() {
+ return Collections.unmodifiableCollection(value.keySet()).iterator();
+ }
+
+ /**
+ * Get the number of options stored in this map.
+ *
+ * @return the number of options
+ */
+ public int size() {
+ return value.size();
+ }
+
+ /**
+ * The empty option map.
+ */
+ public static final OptionMap EMPTY = new OptionMap(Collections.<Option<?>,
Object>emptyMap());
+
+ /**
+ * Create a new builder.
+ *
+ * @return a new builder
+ */
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * A builder for immutable option maps.
+ */
+ public static final class Builder {
+
+ private static class OVPair<T> {
+ Option<T> option;
+ T value;
+
+ private OVPair(final Option<T> option, final T value) {
+ this.option = option;
+ this.value = value;
+ }
+ }
+
+ private List<OVPair<?>> list = new
ArrayList<OVPair<?>>();
+
+ /**
+ * Add a key-value pair.
+ *
+ * @param key the key
+ * @param value the value
+ * @param <T> the option type
+ * @return this builder
+ */
+ public <T> Builder add(Option<T> key, T value) {
+ if (value == null) {
+ throw new NullPointerException("value is null");
+ }
+ list.add(new OVPair<T>(key, value));
+ return this;
+ }
+
+ /**
+ * Add a key-value pair, where the value is a sequence type.
+ *
+ * @param key the key
+ * @param values the values
+ * @param <T> the option type
+ * @return this builder
+ */
+ public <T> Builder addSequence(Option<Sequence<T>> key, T...
values) {
+ list.add(new OVPair<Sequence<T>>(key, Sequence.of(values)));
+ return this;
+ }
+
+ /**
+ * Add a key-value pair, where the value is a flag type.
+ *
+ * @param key the key
+ * @param values the values
+ * @param <T> the option type
+ * @return this builder
+ */
+ public <T extends Enum<T>> Builder
addFlags(Option<FlagSet<T>> key, T... values) {
+ list.add(new OVPair<FlagSet<T>>(key, FlagSet.of(values)));
+ return this;
+ }
+
+ private <T> void copy(Map<?, ?> map, Option<T> option) {
+ add(option, option.cast(map.get(option)));
+ }
+
+ /**
+ * Add all the entries of a map. Any keys of the map which are not valid {@link
Option}s, or whose
+ * values are not valid arguments for the given {@code Option}, will cause an
exception to be thrown.
+ *
+ * @param map the map
+ * @return this builder
+ * @throws ClassCastException if any entries of the map are not valid
option-value pairs
+ */
+ public Builder add(Map<?, ?> map) throws ClassCastException {
+ for (Object key : map.keySet()) {
+ final Option<?> option = Option.class.cast(key);
+ copy(map, option);
+ }
+ return this;
+ }
+
+ private <T> void copy(OptionMap optionMap, Option<T> option) {
+ add(option, optionMap.get(option));
+ }
+
+ /**
+ * Add all entries from an existing option map to the one being built.
+ *
+ * @param optionMap the original option map
+ * @return this builder
+ */
+ public Builder addAll(OptionMap optionMap) {
+ for (Option<?> option : optionMap) {
+ copy(optionMap, option);
+ }
+ return this;
+ }
+
+ /**
+ * Build a map that reflects the current state of this builder.
+ *
+ * @return the new immutable option map
+ */
+ public OptionMap getMap() {
+ final List<OVPair<?>> list = this.list;
+ if (list.size() == 0) {
+ return EMPTY;
+ } else if (list.size() == 1) {
+ final OVPair<?> pair = list.get(0);
+ return new OptionMap(Collections.<Option<?>,
Object>singletonMap(pair.option, pair.value));
+ } else {
+ final Map<Option<?>, Object> map = new
IdentityHashMap<Option<?>, Object>();
+ for (OVPair<?> ovPair : list) {
+ map.put(ovPair.option, ovPair.value);
+ }
+ return new OptionMap(map);
+ }
+ }
+ }
+}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3;
+
+public final class Options {
+
+ private Options() {
+ }
+
+ public static final Option<Sequence<String>> MARSHALLING_PROTOCOLS =
Option.sequence("jboss.remoting3.marshalling.protocols", String.class);
+
+ public static final Option<Sequence<String>> MARSHALLING_CLASS_TABLES =
Option.sequence("jboss.remoting3.marshalling.classTables", String.class);
+
+ public static final Option<Sequence<String>> MARSHALLING_OBJECT_TABLES =
Option.sequence("jboss.remoting3.marshalling.objectTables", String.class);
+
+ public static final Option<Sequence<String>> MARSHALLING_CLASS_RESOLVERS
= Option.sequence("jboss.remoting3.marshalling.classResolvers", String.class);
+
+ public static final Option<Sequence<String>> MARSHALLING_OBJECT_RESOLVERS
= Option.sequence("jboss.remoting3.marshalling.objectResolvers", String.class);
+
+ public static final Option<Sequence<String>>
MARSHALLING_EXTERNALIZER_FACTORIES =
Option.sequence("jboss.remoting3.marshalling.externalizerFactories",
String.class);
+
+ public static final Option<Integer> METRIC =
Option.simple("jboss.remoting3.metric", Integer.class);
+
+ public static final Option<Boolean> EXTERNALLY_VISIBLE =
Option.simple("jboss.remoting3.externallyVisible", Boolean.class);
+}
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestCancelHandler.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestCancelHandler.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestCancelHandler.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -26,8 +26,10 @@
* A handler for request listeners to receive a notification when a request was
cancelled.
*
* @param <O> the reply type
+ * @see org.jboss.remoting3.RequestContext#addCancelHandler(RequestCancelHandler)
*
* @apiviz.exclude
+ * @remoting.implement
*/
public interface RequestCancelHandler<O> {
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestListener.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestListener.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/RequestListener.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -28,6 +28,7 @@
* @param <I> the request type
* @param <O> the reply type
*
+ * @remoting.implement
* @apiviz.landmark
*/
public interface RequestListener<I, O> {
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java
(rev 0)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -0,0 +1,163 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2009, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+
+package org.jboss.remoting3;
+
+import java.io.Serializable;
+import java.util.Iterator;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.AbstractList;
+import java.util.List;
+import java.util.RandomAccess;
+
+/**
+ * An immutable sequence of elements. Though this class implements {@link
java.util.List}, it is in fact
+ * immutable.
+ *
+ * @param <T> the element type
+ */
+public final class Sequence<T> extends AbstractList<T> implements
List<T>, RandomAccess, Serializable {
+
+ private static final long serialVersionUID = 3042164316147742903L;
+
+ private final Object[] values;
+
+ private static final Object[] empty = new Object[0];
+
+ private Sequence(final Object[] values) {
+ final Object[] realValues = values.clone();
+ this.values = realValues;
+ for (Object realValue : realValues) {
+ if (realValue == null) {
+ throw new NullPointerException("value member is null");
+ }
+ }
+ }
+
+ private static final Sequence EMPTY = new Sequence(empty);
+
+ /**
+ * Return a sequence of the given members.
+ *
+ * @param members the members
+ * @param <T> the element type
+ * @return a sequence
+ */
+ public static <T> Sequence<T> of(T... members) {
+ if (members.length == 0) {
+ return empty();
+ } else {
+ return new Sequence<T>(members);
+ }
+ }
+
+ /**
+ * Return a sequence of the given members.
+ *
+ * @param members the members
+ * @param <T> the element type
+ * @return a sequence
+ */
+ public static <T> Sequence<T> of(Collection<T> members) {
+ final Object[] objects = members.toArray();
+ if (objects.length == 0) {
+ return empty();
+ }
+ return new Sequence<T>(objects);
+ }
+
+ /**
+ * Cast a sequence to a different type <b>if</b> all the contained
elements are of the subtype.
+ *
+ * @param newType the class to cast to
+ * @param <N> the new type
+ * @return the typecast sequence
+ * @throws ClassCastException if any elements could not be cast
+ */
+ @SuppressWarnings({ "unchecked" })
+ public <N> Sequence<N> cast(Class<N> newType) throws
ClassCastException {
+ for (Object value : values) {
+ newType.cast(value);
+ }
+ return (Sequence<N>) this;
+ }
+
+ /**
+ * Return an empty sequence.
+ *
+ * @param <T> the element type
+ * @return the empty sequence
+ */
+ @SuppressWarnings({ "unchecked" })
+ public static <T> Sequence<T> empty() {
+ return (Sequence<T>) EMPTY;
+ }
+
+ /**
+ * Get an iterator over the elements of this sequence.
+ *
+ * @return an iterator over the elements of this sequence
+ */
+ @SuppressWarnings({ "unchecked" })
+ public Iterator<T> iterator() {
+ return Arrays.<T>asList((T[]) values).iterator();
+ }
+
+ /**
+ * Return the number of elements in this sequence.
+ *
+ * @return the number of elements
+ */
+ public int size() {
+ return values.length;
+ }
+
+ /**
+ * Determine whether this sequence is empty.
+ *
+ * @return {@code true} if the sequence has no elements
+ */
+ public boolean isEmpty() {
+ return values.length != 0;
+ }
+
+ /**
+ * Get a copy of the values array.
+ *
+ * @return a copy of the values array
+ */
+ public Object[] toArray() {
+ return values.clone();
+ }
+
+ /**
+ * Get the value at a certain index.
+ *
+ * @param index the index
+ * @return the value
+ */
+ @SuppressWarnings({ "unchecked" })
+ public T get(final int index) {
+ return (T) values[index];
+ }
+}
Deleted:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceLocationListener.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceLocationListener.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceLocationListener.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -1,97 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2009, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-
-package org.jboss.remoting3;
-
-import java.net.URI;
-
-/**
- * A listener for watching service location events on an endpoint.
- *
- * @apiviz.landmark
- */
-public interface ServiceLocationListener {
- void serviceLocated(SimpleCloseable listenerHandler, ServiceInfo info);
-
- /**
- * Information about a located service.
- */
- final class ServiceInfo {
- private URI serviceUri;
- private URI locationUri;
- private int metric;
-
- /**
- * Get the URI of the located service.
- *
- * @return the URI
- */
- public URI getServiceUri() {
- return serviceUri;
- }
-
- /**
- * Set the URI of the located service.
- *
- * @param serviceUri the URI
- */
- public void setServiceUri(final URI serviceUri) {
- this.serviceUri = serviceUri;
- }
-
- /**
- * Get the URI of the location of the located service.
- *
- * @return the URI
- */
- public URI getLocationUri() {
- return locationUri;
- }
-
- /**
- * Set the URI of the location of the located service.
- *
- * @param locationUri the URI
- */
- public void setLocationUri(final URI locationUri) {
- this.locationUri = locationUri;
- }
-
- /**
- * Get the preference metric of this located service.
- *
- * @return the preference metric
- */
- public int getMetric() {
- return metric;
- }
-
- /**
- * Set the preference metric of this located service.
- *
- * @param metric the preference metric
- */
- public void setMetric(final int metric) {
- this.metric = metric;
- }
- }
-}
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistration.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistration.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistration.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -32,22 +32,22 @@
private final String serviceType;
private final String groupName;
private final String endpointName;
- private final int metric;
+ private final OptionMap optionMap;
private final RequestHandlerConnector connector;
private volatile SimpleCloseable handle;
- ServiceRegistration(final String serviceType, final String groupName, final String
endpointName, final int metric, final RequestHandlerConnector connector) {
+ ServiceRegistration(final String serviceType, final String groupName, final String
endpointName, final OptionMap optionMap, final RequestHandlerConnector connector) {
remote = true;
this.serviceType = serviceType;
this.groupName = groupName;
this.endpointName = endpointName;
- this.metric = metric;
+ this.optionMap = optionMap;
this.connector = connector;
}
ServiceRegistration(final String serviceType, final String groupName, final String
endpointName, final RequestHandlerConnector connector) {
remote = false;
- metric = 0;
+ optionMap = OptionMap.EMPTY;
this.serviceType = serviceType;
this.groupName = groupName;
this.endpointName = endpointName;
@@ -76,8 +76,8 @@
return endpointName;
}
- public int getMetric() {
- return metric;
+ public OptionMap getOptionMap() {
+ return optionMap;
}
public RequestHandlerConnector getConnector() {
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistrationListener.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistrationListener.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistrationListener.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -28,6 +28,7 @@
* A listener for watching service registrations on an endpoint.
*
* @apiviz.landmark
+ * @remoting.implement
*/
public interface ServiceRegistrationListener {
@@ -47,9 +48,9 @@
final class ServiceInfo implements Cloneable {
private String serviceType;
private String groupName;
- private int metric;
private RequestHandlerConnector requestHandlerConnector;
private SimpleCloseable registrationHandle;
+ private OptionMap optionMap;
/**
* Construct a new instance.
@@ -94,21 +95,21 @@
}
/**
- * Get the metric.
+ * Get the option map.
*
- * @return the metric
+ * @return the option map
*/
- public int getMetric() {
- return metric;
+ public OptionMap getOptionMap() {
+ return optionMap;
}
/**
- * Set the metric.
+ * Set the option map.
*
- * @param metric the metric
+ * @param optionMap the option map
*/
- public void setMetric(final int metric) {
- this.metric = metric;
+ public void setOptionMap(final OptionMap optionMap) {
+ this.optionMap = optionMap;
}
/**
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicProtocol.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicProtocol.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicProtocol.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -24,7 +24,6 @@
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.ReplyHandler;
-import org.jboss.remoting3.spi.Handle;
import org.jboss.xnio.channels.StreamChannel;
import org.jboss.xnio.channels.ChannelOutputStream;
import org.jboss.xnio.channels.ChannelInputStream;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicRequestHandler.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicRequestHandler.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicRequestHandler.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -26,7 +26,6 @@
import org.jboss.remoting3.spi.ReplyHandler;
import org.jboss.remoting3.spi.RemoteRequestContext;
import org.jboss.remoting3.spi.SpiUtils;
-import org.jboss.remoting3.spi.AbstractAutoCloseable;
import org.jboss.marshalling.Marshaller;
import org.jboss.xnio.channels.StreamChannel;
import org.jboss.xnio.IoUtils;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerReplyTransmitter.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerReplyTransmitter.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerReplyTransmitter.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -28,7 +28,6 @@
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.log.Logger;
import org.jboss.remoting3.spi.RequestHandler;
-import org.jboss.remoting3.spi.Handle;
/**
*
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerRequestConsumer.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerRequestConsumer.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/protocol/basic/BasicServerRequestConsumer.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -24,7 +24,6 @@
import org.jboss.marshalling.Unmarshaller;
import org.jboss.remoting3.spi.RequestHandler;
-import org.jboss.remoting3.spi.Handle;
import org.jboss.remoting3.spi.RemoteRequestContext;
import org.jboss.remoting3.spi.ReplyHandler;
import org.jboss.xnio.channels.StreamChannel;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -24,17 +24,13 @@
import org.jboss.remoting3.Endpoint;
import org.jboss.remoting3.Remoting;
-import org.jboss.remoting3.ClientSource;
import org.jboss.remoting3.Client;
import org.jboss.remoting3.multiplex.MultiplexProtocol;
import org.jboss.remoting3.multiplex.MultiplexConfiguration;
import org.jboss.remoting3.multiplex.MultiplexConnection;
-import org.jboss.remoting3.spi.RequestHandlerSource;
-import org.jboss.remoting3.spi.Handle;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.Buffers;
import org.jboss.xnio.Xnio;
-import org.jboss.xnio.CloseableTcpConnector;
import org.jboss.xnio.ConfigurableFactory;
import org.jboss.xnio.ChannelSource;
import org.jboss.xnio.IoFuture;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexServerExample.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexServerExample.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexServerExample.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -27,8 +27,6 @@
import org.jboss.remoting3.LocalServiceConfiguration;
import org.jboss.remoting3.multiplex.MultiplexProtocol;
import org.jboss.remoting3.multiplex.MultiplexConfiguration;
-import org.jboss.remoting3.spi.RequestHandlerSource;
-import org.jboss.remoting3.spi.Handle;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.Buffers;
import org.jboss.xnio.IoHandlerFactory;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StreamingRot13RequestListener.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StreamingRot13RequestListener.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StreamingRot13RequestListener.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -2,7 +2,6 @@
import java.io.IOException;
import java.io.Reader;
-import org.jboss.remoting3.AbstractRequestListener;
import org.jboss.remoting3.RemoteExecutionException;
import org.jboss.remoting3.RequestContext;
Modified:
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StringRot13RequestListener.java
===================================================================
---
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StringRot13RequestListener.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/StringRot13RequestListener.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -1,7 +1,6 @@
package org.jboss.remoting3.samples.simple;
import java.io.IOException;
-import org.jboss.remoting3.AbstractRequestListener;
import org.jboss.remoting3.RemoteExecutionException;
import org.jboss.remoting3.RequestContext;
import org.jboss.xnio.log.Logger;
Modified:
remoting3/trunk/samples/src/test/java/org/jboss/remoting3/samples/protocol/basic/BasicTestCase.java
===================================================================
---
remoting3/trunk/samples/src/test/java/org/jboss/remoting3/samples/protocol/basic/BasicTestCase.java 2009-09-16
03:01:55 UTC (rev 5491)
+++
remoting3/trunk/samples/src/test/java/org/jboss/remoting3/samples/protocol/basic/BasicTestCase.java 2009-09-16
04:13:30 UTC (rev 5492)
@@ -32,12 +32,10 @@
import org.jboss.xnio.channels.StreamChannel;
import org.jboss.remoting3.Endpoint;
import org.jboss.remoting3.Remoting;
-import org.jboss.remoting3.AbstractRequestListener;
import org.jboss.remoting3.RequestContext;
import org.jboss.remoting3.RemoteExecutionException;
import org.jboss.remoting3.Client;
import org.jboss.remoting3.spi.RequestHandler;
-import org.jboss.remoting3.spi.Handle;
import org.jboss.marshalling.MarshallingConfiguration;
import org.jboss.marshalling.river.RiverMarshallerFactory;
import java.util.concurrent.ThreadPoolExecutor;
Modified: remoting3/trunk/taglet/pom.xml
===================================================================
--- remoting3/trunk/taglet/pom.xml 2009-09-16 03:01:55 UTC (rev 5491)
+++ remoting3/trunk/taglet/pom.xml 2009-09-16 04:13:30 UTC (rev 5492)
@@ -29,7 +29,7 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting-taglet</artifactId>
<packaging>jar</packaging>
- <version>1.1.0.CR1</version>
+ <version>3.1.0.CR1</version>
<dependencies>
<dependency>