Author: david.lloyd(a)jboss.com
Date: 2009-04-30 19:41:11 -0400 (Thu, 30 Apr 2009)
New Revision: 5105
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/SpiUtils.java
Log:
More javadoc
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java 2009-04-30
23:22:16 UTC (rev 5104)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java 2009-04-30
23:41:11 UTC (rev 5105)
@@ -25,8 +25,16 @@
import org.jboss.remoting3.HandleableCloseable;
/**
+ * A context for a connection provider which provides a means to accept a connection.
*
+ * @remoting.consume
*/
public interface ConnectionProviderContext extends
HandleableCloseable<ConnectionProviderContext> {
+
+ /**
+ * Accept a connection that was received by the corresponding protocol handler.
+ *
+ * @param connectionHandlerFactory the connection handler factory
+ */
void accept(ConnectionHandlerFactory connectionHandlerFactory);
}
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/SpiUtils.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/SpiUtils.java 2009-04-30
23:22:16 UTC (rev 5104)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/SpiUtils.java 2009-04-30
23:41:11 UTC (rev 5105)
@@ -26,6 +26,7 @@
import org.jboss.remoting3.CloseHandler;
import org.jboss.remoting3.RequestCancelHandler;
import org.jboss.remoting3.RequestContext;
+import org.jboss.xnio.IoFuture;
import org.jboss.xnio.log.Logger;
/**
@@ -110,6 +111,20 @@
}
/**
+ * Get a {@code Cancellable} for an {@code IoFuture}.
+ *
+ * @param future the future
+ * @return the cancellable
+ */
+ public static Cancellable cancellable(final IoFuture<?> future) {
+ return new Cancellable() {
+ public void cancel() {
+ future.cancel();
+ }
+ };
+ }
+
+ /**
* Get a remote request context that simply ignores a cancel request.
*
* @return a blank remote request context