JBoss Remoting SVN: r5521 - remoting2/branches/2.x/lib/jboss.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-17 11:02:41 -0400 (Thu, 17 Sep 2009)
New Revision: 5521
Added:
remoting2/branches/2.x/lib/jboss/jboss-logging-spi.jar
remoting2/branches/2.x/lib/jboss/jnpserver.jar
Log:
JBREM-1158: Updated jars.
Added: remoting2/branches/2.x/lib/jboss/jboss-logging-spi.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jboss/jboss-logging-spi.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: remoting2/branches/2.x/lib/jboss/jnpserver.jar
===================================================================
(Binary files differ)
Property changes on: remoting2/branches/2.x/lib/jboss/jnpserver.jar
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
15 years, 2 months
JBoss Remoting SVN: r5520 - remoting2/branches/2.x/lib/jboss.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-17 11:01:29 -0400 (Thu, 17 Sep 2009)
New Revision: 5520
Removed:
remoting2/branches/2.x/lib/jboss/jboss-logging-spi.jar
remoting2/branches/2.x/lib/jboss/jnpserver.jar
Log:
JBREM-1158: Temporarily deleted jars to work around svn confusion.
Deleted: remoting2/branches/2.x/lib/jboss/jboss-logging-spi.jar
===================================================================
(Binary files differ)
Deleted: remoting2/branches/2.x/lib/jboss/jnpserver.jar
===================================================================
(Binary files differ)
15 years, 2 months
JBoss Remoting SVN: r5519 - remoting2/branches/2.x/lib/jbossweb.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-17 10:48:29 -0400 (Thu, 17 Sep 2009)
New Revision: 5519
Modified:
remoting2/branches/2.x/lib/jbossweb/README
remoting2/branches/2.x/lib/jbossweb/jbossweb.jar
Log:
JBREM-1158: Updated jars.
Modified: remoting2/branches/2.x/lib/jbossweb/README
===================================================================
--- remoting2/branches/2.x/lib/jbossweb/README 2009-09-17 14:48:04 UTC (rev 5518)
+++ remoting2/branches/2.x/lib/jbossweb/README 2009-09-17 14:48:29 UTC (rev 5519)
@@ -1,3 +1,3 @@
File Version From
------- ------- ----
-jbossweb.jar 2.1.3.GA http://repository.jboss.com/maven2/jboss/web/jbossweb/2.1.3.GA/
+jbossweb.jar 2.1.4.GA http://repository.jboss.com/maven2/jboss/web/jbossweb/2.1.4.GA/
Modified: remoting2/branches/2.x/lib/jbossweb/jbossweb.jar
===================================================================
(Binary files differ)
15 years, 2 months
JBoss Remoting SVN: r5517 - remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-17 10:35:01 -0400 (Thu, 17 Sep 2009)
New Revision: 5517
Modified:
remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
Log:
JBREM-1152: Fixed ConcurrentModificationException.
Modified: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
===================================================================
--- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-17 14:33:25 UTC (rev 5516)
+++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-17 14:35:01 UTC (rev 5517)
@@ -28,7 +28,6 @@
import java.net.Socket;
import java.net.SocketException;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@@ -97,20 +96,20 @@
// Verify MicroSocketClientInvoker retries invocation after failure to get a connection.
client.invoke(SEND_CALLBACK);
assertEquals(1, callbackHandler.received);
- Set serverThreads = clientpool.getContents();
- Iterator it = serverThreads.iterator();
- while (it.hasNext())
+ Set set = clientpool.getContents();
+ Object[] serverThreads = set.toArray();
+ for (int i = 0; i < serverThreads.length; i++)
{
- ServerThread st = (ServerThread) it.next();
+ ServerThread st = (ServerThread) serverThreads[i];
st.shutdown();
}
client.invoke(SEND_CALLBACK);
assertEquals(2, callbackHandler.received);
- serverThreads = clientpool.getContents();
- it = serverThreads.iterator();
- while (it.hasNext())
+ set = clientpool.getContents();
+ serverThreads = set.toArray();
+ for (int i = 0; i < serverThreads.length; i++)
{
- ServerThread st = (ServerThread) it.next();
+ ServerThread st = (ServerThread) serverThreads[i];
st.shutdown();
}
client.invoke(SEND_CALLBACK);
15 years, 2 months
JBoss Remoting SVN: r5516 - remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-17 10:33:25 -0400 (Thu, 17 Sep 2009)
New Revision: 5516
Modified:
remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
Log:
JBREM-1152: Fixed ConcurrentModificationException.
Modified: remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java
===================================================================
--- remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-17 04:30:56 UTC (rev 5515)
+++ remoting2/branches/2.x/src/tests/org/jboss/test/remoting/transport/bisocket/socketexception/BisocketSocketCreationExceptionTestCase.java 2009-09-17 14:33:25 UTC (rev 5516)
@@ -28,7 +28,6 @@
import java.net.Socket;
import java.net.SocketException;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.Map;
import java.util.Set;
@@ -97,20 +96,20 @@
// Verify MicroSocketClientInvoker retries invocation after failure to get a connection.
client.invoke(SEND_CALLBACK);
assertEquals(1, callbackHandler.received);
- Set serverThreads = clientpool.getContents();
- Iterator it = serverThreads.iterator();
- while (it.hasNext())
+ Set set = clientpool.getContents();
+ Object[] serverThreads = set.toArray();
+ for (int i = 0; i < serverThreads.length; i++)
{
- ServerThread st = (ServerThread) it.next();
+ ServerThread st = (ServerThread) serverThreads[i];
st.shutdown();
}
client.invoke(SEND_CALLBACK);
assertEquals(2, callbackHandler.received);
- serverThreads = clientpool.getContents();
- it = serverThreads.iterator();
- while (it.hasNext())
+ set = clientpool.getContents();
+ serverThreads = set.toArray();
+ for (int i = 0; i < serverThreads.length; i++)
{
- ServerThread st = (ServerThread) it.next();
+ ServerThread st = (ServerThread) serverThreads[i];
st.shutdown();
}
client.invoke(SEND_CALLBACK);
15 years, 2 months
JBoss Remoting SVN: r5515 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-09-17 00:30:56 -0400 (Thu, 17 Sep 2009)
New Revision: 5515
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client.java
Log:
Clarify javadoc
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client.java 2009-09-17 03:49:59 UTC (rev 5514)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Client.java 2009-09-17 04:30:56 UTC (rev 5515)
@@ -89,7 +89,7 @@
* @throws ReplyException if the operation succeeded but the reply cannot be read for some reason
* @throws IndeterminateOutcomeException if the result of the operation cannot be ascertained
* @throws ObjectStreamException if marshalling or unmarshalling some part of the request failed
- * @throws IOException if some I/O error occurred while sending the request
+ * @throws IOException if some other I/O error occurred while sending the request
*/
O invoke(I request) throws IOException, CancellationException;
@@ -98,16 +98,18 @@
* may use a local policy to assign one or more thread(s) to handle the local end of that stream, or it may
* fail with an exception (e.g. if this method is called on a client with no threads to handle streaming).
* <p/>
- * Returns immediately. The returned {@code IoFuture} object can be queried at a later time to determine the result
- * of the operation. If the operation fails, one of the conditions described on the {@link #invoke(Object) invoke(I)}
- * method will result. This condition can be determined by reading the status of the {@code IoFuture} object or
- * by attempting to read the result.
+ * This method <b>may</b> block until the request is sent; however once the request is sent, the rest of the request
+ * delivery and processing is fully asynchronous. The returned {@code IoFuture} object can be queried at a later time
+ * to determine the result of the operation. If the operation fails, one of the conditions described on the
+ * {@link #invoke(Object) invoke(I)} method will result. This condition can be determined by reading the status of
+ * the {@code IoFuture} object or by attempting to read the result.
*
* @param request the request to send
*
* @return a future representing the result of the request
*
- * @throws IOException if the request could not be sent
+ * @throws ObjectStreamException if marshalling or unmarshalling some part of the request failed
+ * @throws IOException if some other I/O error occurred while sending the request
*/
IoFuture<? extends O> send(I request) throws IOException;
}
15 years, 2 months
JBoss Remoting SVN: r5514 - remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-09-16 23:49:59 -0400 (Wed, 16 Sep 2009)
New Revision: 5514
Modified:
remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MarshallingProtocol.java
remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionHandler.java
remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionProvider.java
remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexOptions.java
Log:
point commit
Modified: remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MarshallingProtocol.java
===================================================================
--- remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MarshallingProtocol.java 2009-09-17 03:49:31 UTC (rev 5513)
+++ remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MarshallingProtocol.java 2009-09-17 03:49:59 UTC (rev 5514)
@@ -22,25 +22,78 @@
package org.jboss.remoting3.multiplex;
-import org.jboss.marshalling.MarshallerFactory;
+import org.jboss.marshalling.Marshaller;
+import org.jboss.marshalling.Unmarshaller;
+import org.jboss.marshalling.ClassTable;
+import org.jboss.marshalling.ObjectTable;
+import org.jboss.marshalling.ClassExternalizerFactory;
+import org.jboss.marshalling.ClassResolver;
+import org.jboss.marshalling.ObjectResolver;
+import org.jboss.xnio.Pool;
/**
- * A registered marshalling protocol, which consists of the combination of a factory and the version.
+ * A registered marshalling protocol.
+ *
+ * @remoting.implement
*/
-final class MarshallingProtocol {
- private final MarshallerFactory marshallerFactory;
- private final int configuredVersion;
+public interface MarshallingProtocol {
- MarshallingProtocol(final MarshallerFactory marshallerFactory, final int configuredVersion) {
- this.marshallerFactory = marshallerFactory;
- this.configuredVersion = configuredVersion;
- }
+ /**
+ * Get a configured unmarshaller pool.
+ *
+ * @param configuration the configuration to use
+ * @return the pool
+ */
+ Pool<Unmarshaller> getUnmarshallerPool(Configuration configuration);
- public MarshallerFactory getMarshallerFactory() {
- return marshallerFactory;
- }
+ /**
+ * Get a configured marshaller pool.
+ *
+ * @param configuration the configuration to use
+ * @return the pool
+ */
+ Pool<Marshaller> getMarshallerPool(Configuration configuration);
- public int getConfiguredVersion() {
- return configuredVersion;
+ /**
+ * The configuration for a marshalling protocol.
+ *
+ * @remoting.consume
+ */
+ interface Configuration {
+
+ /**
+ * Get a user class table, if any.
+ *
+ * @return the user class table or {@code null} if none is configured
+ */
+ ClassTable getUserClassTable();
+
+ /**
+ * Get a user object table, if any.
+ *
+ * @return the user object table or {@code null} if none is configured
+ */
+ ObjectTable getUserObjectTable();
+
+ /**
+ * Get a user externalizer factory, if any.
+ *
+ * @return the user externalizer factory
+ */
+ ClassExternalizerFactory getUserExternalizerFactory();
+
+ /**
+ * Get a user class resolver, if any.
+ *
+ * @return the user class resolver
+ */
+ ClassResolver getUserClassResolver();
+
+ /**
+ * Get a user object resolver, if any.
+ *
+ * @return the user object resolver
+ */
+ ObjectResolver getUserObjectResolver();
}
}
Modified: remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionHandler.java
===================================================================
--- remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionHandler.java 2009-09-17 03:49:31 UTC (rev 5513)
+++ remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionHandler.java 2009-09-17 03:49:59 UTC (rev 5514)
@@ -48,50 +48,64 @@
public Cancellable open(final String serviceName, final String groupName, final Result<RequestHandler> result) {
final EstablishedConnection establishedConnection = this.establishedConnection;
- final int id = establishedConnection.nextRemoteClient();
- final BufferAllocator<ByteBuffer> allocator = establishedConnection.getAllocator();
- final ByteBuffer buffer = allocator.allocate();
- final AllocatedMessageChannel channel = establishedConnection.getChannel();
- final RemoteClient remoteClient = new RemoteClient(result, new MultiplexRequestHandler(id, establishedConnection));
- establishedConnection.addOutstandingClient(id, remoteClient);
- buffer.put((byte) MessageType.CLIENT_OPEN);
- buffer.putInt(id);
- final byte[] serviceNameBytes = serviceName.getBytes(charset);
- buffer.putShort((short) serviceNameBytes.length);
- buffer.put(serviceNameBytes);
- final byte[] groupNameBytes = groupName.getBytes(charset);
- buffer.putShort((short) groupNameBytes.length);
- buffer.put(groupNameBytes);
- buffer.flip();
+ final PermitManager.Permit permit = establishedConnection.nextRemoteClient();
+ boolean ok = false;
try {
- Channels.sendBlocking(channel, buffer);
- } catch (IOException e) {
- result.setException(e);
- establishedConnection.removeRemoteClient(id);
- }
- return new Cancellable() {
- private final AtomicBoolean cancelled = new AtomicBoolean();
-
- public void cancel() {
- if (cancelled.getAndSet(true)) {
- // cancel already sent
- return;
- }
- if (remoteClient.getRequestHandler() != null) {
- // already done; don't waste the bandwidth
- return;
- }
+ final int id = permit.getId();
+ final RemoteClient remoteClient = new RemoteClient(result, new MultiplexRequestHandler(id, establishedConnection));
+ establishedConnection.addRemoteClient(id, remoteClient);
+ try {
+ final BufferAllocator<ByteBuffer> allocator = establishedConnection.getAllocator();
final ByteBuffer buffer = allocator.allocate();
- buffer.put((byte) MessageType.CLIENT_OPEN_CANCEL);
+ final AllocatedMessageChannel channel = establishedConnection.getChannel();
+ buffer.put((byte) MessageType.CLIENT_OPEN);
buffer.putInt(id);
+ final byte[] serviceNameBytes = serviceName.getBytes(charset);
+ buffer.putShort((short) serviceNameBytes.length);
+ buffer.put(serviceNameBytes);
+ final byte[] groupNameBytes = groupName.getBytes(charset);
+ buffer.putShort((short) groupNameBytes.length);
+ buffer.put(groupNameBytes);
buffer.flip();
try {
Channels.sendBlocking(channel, buffer);
} catch (IOException e) {
- log.trace("Sending a request to cancel a client open failed");
+ result.setException(e);
}
+ ok = true;
+ return new Cancellable() {
+ private final AtomicBoolean cancelled = new AtomicBoolean();
+
+ public void cancel() {
+ if (cancelled.getAndSet(true)) {
+ // cancel already sent
+ return;
+ }
+ if (remoteClient.getRequestHandler() != null) {
+ // already done; don't waste the bandwidth
+ return;
+ }
+ final ByteBuffer buffer = allocator.allocate();
+ buffer.put((byte) MessageType.CLIENT_OPEN_CANCEL);
+ buffer.putInt(id);
+ buffer.flip();
+ try {
+ Channels.sendBlocking(channel, buffer);
+ } catch (IOException e) {
+ log.trace("Sending a request to cancel a client open failed");
+ }
+ }
+ };
+ } finally {
+ if (! ok) {
+ establishedConnection.removeRemoteClient(id);
+ }
}
- };
+ } finally {
+ if (! ok) {
+ permit.release();
+ }
+ }
}
public RequestHandlerConnector createConnector(final RequestHandler localHandler) {
Modified: remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionProvider.java
===================================================================
--- remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionProvider.java 2009-09-17 03:49:31 UTC (rev 5513)
+++ remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexConnectionProvider.java 2009-09-17 03:49:59 UTC (rev 5514)
@@ -28,7 +28,7 @@
import org.jboss.remoting3.spi.Result;
import org.jboss.remoting3.spi.SpiUtils;
import org.jboss.remoting3.spi.ConnectionProviderContext;
-import org.jboss.remoting3.OptionMap;
+import org.jboss.xnio.OptionMap;
import org.jboss.xnio.FutureConnection;
import org.jboss.xnio.IoFuture;
import org.jboss.xnio.IoHandlerFactory;
Modified: remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexOptions.java
===================================================================
--- remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexOptions.java 2009-09-17 03:49:31 UTC (rev 5513)
+++ remoting3-multiplex/trunk/src/main/java/org/jboss/remoting3/multiplex/MultiplexOptions.java 2009-09-17 03:49:59 UTC (rev 5514)
@@ -22,7 +22,7 @@
package org.jboss.remoting3.multiplex;
-import org.jboss.remoting3.Option;
+import org.jboss.xnio.Option;
/**
* Options which may be used to configure a multiplex connection.
15 years, 2 months
JBoss Remoting SVN: r5513 - in remoting3/trunk: jboss-remoting/src/main/java/org/jboss/remoting3/spi and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2009-09-16 23:49:31 -0400 (Wed, 16 Sep 2009)
New Revision: 5513
Removed:
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/Sequence.java
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.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/Options.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/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java
remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java
Log:
Move the Option system to XNIO, who needs it badly
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java 2009-09-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Endpoint.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -7,6 +7,7 @@
import org.jboss.remoting3.spi.RequestHandler;
import org.jboss.remoting3.spi.ConnectionProviderRegistration;
import org.jboss.xnio.IoFuture;
+import org.jboss.xnio.OptionMap;
/**
* A potential participant in a JBoss Remoting communications relationship.
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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -55,6 +55,7 @@
import org.jboss.xnio.IoFuture;
import org.jboss.xnio.IoUtils;
import org.jboss.xnio.WeakCloseable;
+import org.jboss.xnio.OptionMap;
import org.jboss.xnio.log.Logger;
/**
Deleted: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java 2009-09-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/FlagSet.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -1,149 +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.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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/LocalServiceConfiguration.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -22,6 +22,8 @@
package org.jboss.remoting3;
+import org.jboss.xnio.OptionMap;
+
/**
* A configuration for a service to be deployed into the endpoint.
*
Deleted: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java 2009-09-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Option.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -1,200 +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.util.Collection;
-import java.io.Serializable;
-import java.io.ObjectStreamException;
-import java.io.InvalidObjectException;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-
-/**
- * A strongly-typed option to configure an aspect of a service or connection. Options are immutable and use identity comparisons
- * and hash codes. Options should always be declared as {@code public static final} members in order to support serialization.
- *
- * @param <T> the option value type
- */
-public abstract class Option<T> implements Serializable {
-
- private static final long serialVersionUID = -1564427329140182760L;
-
- private final Class<?> declClass;
- private final String name;
-
- Option(final Class<?> declClass, final String name) {
- this.declClass = declClass;
- 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 declClass the declaring class of the option
- * @param name the (field) name of this option
- * @param type the class of the value associated with this option
- * @return the option instance
- */
- public static <T> Option<T> simple(final Class<?> declClass, final String name, final Class<T> type) {
- return new SingleOption<T>(declClass, 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 declClass the declaring class of the option
- * @param name the (field) name of this option
- * @param elementType the class of the sequence element value associated with this option
- * @return the option instance
- */
- public static <T> Option<Sequence<T>> sequence(final Class<?> declClass, final String name, final Class<T> elementType) {
- return new SequenceOption<T>(declClass, 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 declClass the declaring class of the option
- * @param name the (field) 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 Class<?> declClass, final String name, final Class<T> elementType) {
- return new FlagsOption<T>(declClass, name, elementType);
- }
-
- /**
- * Get the name of this option.
- *
- * @return the option name
- */
- public String getName() {
- return name;
- }
-
- /**
- * Get a human-readible string representation of this object.
- *
- * @return the string representation
- */
- public String toString() {
- return super.toString() + " (" + declClass.getName() + "#" + 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;
-
- /**
- * Resolve this instance for serialization.
- *
- * @return the resolved object
- * @throws ObjectStreamException if the object could not be resolved
- */
- protected final Object readResolve() throws ObjectStreamException {
- try {
- final Field field = declClass.getField(name);
- final int modifiers = field.getModifiers();
- if (! Modifier.isProtected(modifiers)) {
- throw new InvalidObjectException("Invalid Option instance (the field is not public)");
- }
- if (! Modifier.isStatic(modifiers)) {
- throw new InvalidObjectException("Invalid Option instance (the field is not static)");
- }
- return field.get(null);
- } catch (NoSuchFieldException e) {
- throw new InvalidObjectException("Invalid Option instance (no matching field)");
- } catch (IllegalAccessException e) {
- throw new InvalidObjectException("Invalid Option instance (Illegal access on field get)");
- }
- }
-}
-
-final class SingleOption<T> extends Option<T> {
-
- private static final long serialVersionUID = 2449094406108952764L;
-
- private transient final Class<T> type;
-
- SingleOption(final Class<?> declClass, final String name, final Class<T> type) {
- super(declClass, name);
- this.type = type;
- }
-
- public T cast(final Object o) {
- return type.cast(o);
- }
-}
-
-final class SequenceOption<T> extends Option<Sequence<T>> {
-
- private static final long serialVersionUID = -4328676629293125136L;
-
- private transient final Class<T> elementType;
-
- SequenceOption(final Class<?> declClass, final String name, final Class<T> elementType) {
- super(declClass, name);
- this.elementType = elementType;
- }
-
- public Sequence<T> cast(final Object o) {
- if (o instanceof Sequence) {
- return ((Sequence<?>)o).cast(elementType);
- } else if (o instanceof Object[]){
- return Sequence.of((Object[])o).cast(elementType);
- } else if (o instanceof Collection) {
- return Sequence.of((Collection<?>)o).cast(elementType);
- } else {
- throw new ClassCastException("Not a sequence");
- }
- }
-}
-
-final class FlagsOption<T extends Enum<T>> extends Option<FlagSet<T>> {
-
- private static final long serialVersionUID = -5487268452958691541L;
-
- private transient final Class<T> elementType;
-
- FlagsOption(final Class<?> declClass, final String name, final Class<T> elementType) {
- super(declClass, 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
Deleted: 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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/OptionMap.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -1,304 +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.util.Iterator;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.Map;
-import java.util.Collections;
-import java.util.IdentityHashMap;
-import java.io.Serializable;
-
-/**
- * An immutable map of options to option values. No {@code null} keys or values are permitted.
- */
-public final class OptionMap implements Iterable<Option<?>>, Serializable {
-
- private static final long serialVersionUID = 3632842565346928132L;
-
- private final Map<Option<?>, Object> value;
-
- private OptionMap(final Map<Option<?>, Object> value) {
- this.value = value;
- }
-
- /**
- * Determine whether this option map contains the given option.
- *
- * @param option the option to check
- * @return {@code true} if the option is present in the option map
- */
- public boolean contains(Option<?> option) {
- return value.containsKey(option);
- }
-
- /**
- * 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
- */
- public <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. Create an instance with the {@link OptionMap#builder()} method.
- */
- public static final class Builder {
-
- private 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 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 int values to an Integer sequence key.
- *
- * @param key the key
- * @param values the values
- * @return this builder
- */
- public Builder addSequence(Option<Sequence<Integer>> key, int... values) {
- Integer[] a = new Integer[values.length];
- for (int i = 0; i < values.length; i++) {
- a[i] = Integer.valueOf(values[i]);
- }
- list.add(new OVPair<Sequence<Integer>>(key, Sequence.of(a)));
- 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 long values to an Long sequence key.
- *
- * @param key the key
- * @param values the values
- * @return this builder
- */
- public Builder addSequence(Option<Sequence<Long>> key, long... values) {
- Long[] a = new Long[values.length];
- for (int i = 0; i < values.length; i++) {
- a[i] = Long.valueOf(values[i]);
- }
- list.add(new OVPair<Sequence<Long>>(key, Sequence.of(a)));
- 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 boolean values to an Boolean sequence key.
- *
- * @param key the key
- * @param values the values
- * @return this builder
- */
- public Builder addSequence(Option<Sequence<Boolean>> key, boolean... values) {
- Boolean[] a = new Boolean[values.length];
- for (int i = 0; i < values.length; i++) {
- a[i] = Boolean.valueOf(values[i]);
- }
- list.add(new OVPair<Sequence<Boolean>>(key, Sequence.of(a)));
- 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);
- }
- }
- }
-}
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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Options.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -22,6 +22,9 @@
package org.jboss.remoting3;
+import org.jboss.xnio.Option;
+import org.jboss.xnio.Sequence;
+
/**
* Common options for service registration.
*/
Deleted: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java 2009-09-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/Sequence.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -1,166 +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.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) {
- if (members instanceof Sequence) {
- return (Sequence<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];
- }
-}
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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistration.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -23,6 +23,7 @@
package org.jboss.remoting3;
import org.jboss.remoting3.spi.RequestHandlerConnector;
+import org.jboss.xnio.OptionMap;
/**
*
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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/ServiceRegistrationListener.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -23,6 +23,7 @@
package org.jboss.remoting3;
import org.jboss.remoting3.spi.RequestHandlerConnector;
+import org.jboss.xnio.OptionMap;
/**
* A listener for watching service registrations on an endpoint.
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java 2009-09-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -23,7 +23,7 @@
package org.jboss.remoting3.spi;
import java.net.URI;
-import org.jboss.remoting3.OptionMap;
+import org.jboss.xnio.OptionMap;
/**
* A connection provider. Used to establish connections with remote systems. There is typically one instance
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-17 01:39:06 UTC (rev 5512)
+++ remoting3/trunk/samples/src/main/java/org/jboss/remoting3/samples/simple/MultiplexClientExample.java 2009-09-17 03:49:31 UTC (rev 5513)
@@ -24,7 +24,7 @@
import org.jboss.remoting3.Endpoint;
import org.jboss.remoting3.Remoting;
-import org.jboss.remoting3.OptionMap;
+import org.jboss.xnio.OptionMap;
import org.jboss.remoting3.Connection;
import org.jboss.remoting3.Client;
import org.jboss.xnio.IoUtils;
15 years, 2 months
JBoss Remoting SVN: r5512 - remoting2/branches/2.x/docs/guide/en.
by jboss-remoting-commits@lists.jboss.org
Author: ron.sigal(a)jboss.com
Date: 2009-09-16 21:39:06 -0400 (Wed, 16 Sep 2009)
New Revision: 5512
Modified:
remoting2/branches/2.x/docs/guide/en/master.xml
Log:
JBREM-1135: Updated release date.
Modified: remoting2/branches/2.x/docs/guide/en/master.xml
===================================================================
--- remoting2/branches/2.x/docs/guide/en/master.xml 2009-09-17 01:37:16 UTC (rev 5511)
+++ remoting2/branches/2.x/docs/guide/en/master.xml 2009-09-17 01:39:06 UTC (rev 5512)
@@ -26,7 +26,7 @@
<subtitle>JBoss Remoting version 2.5.2</subtitle>
- <releaseinfo>May 15, 2009</releaseinfo>
+ <releaseinfo>September 17, 2009</releaseinfo>
<mediaobject>
<imageobject>
15 years, 2 months