Author: david.lloyd(a)jboss.com
Date: 2009-09-14 18:57:51 -0400 (Mon, 14 Sep 2009)
New Revision: 5474
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java
Log:
Minor fixups
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-14
19:53:20 UTC (rev 5473)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2009-09-14
22:57:51 UTC (rev 5474)
@@ -356,7 +356,7 @@
if (sm != null) {
sm.checkPermission(ADD_CONNECTION_PROVIDER_PERM);
}
- final ConnectionProviderContextImpl context = new
ConnectionProviderContextImpl(executor, LOOPBACK_CONNECTION_HANDLER);
+ final ConnectionProviderContextImpl context = new
ConnectionProviderContextImpl(executor, loopbackConnectionHandler);
final ConnectionProvider provider = providerFactory.createInstance(context);
if (connectionProviders.putIfAbsent(uriScheme, provider) != null) {
IoUtils.safeClose(context);
@@ -397,9 +397,9 @@
private class ConnectionImpl extends AbstractHandleableCloseable<Connection>
implements Connection {
private final ConnectionHandler connectionHandler;
- private ConnectionImpl(final ConnectionHandlerFactory connectionHandler) {
+ private ConnectionImpl(final ConnectionHandlerFactory connectionHandlerFactory)
{
super(EndpointImpl.this.executor);
- this.connectionHandler =
connectionHandler.createInstance(LOOPBACK_CONNECTION_HANDLER);
+ connectionHandler =
connectionHandlerFactory.createInstance(loopbackConnectionHandler);
}
public <I, O> IoFuture<? extends Client<I, O>> openClient(final
String serviceType, final String groupName, final Class<I> requestClass, final
Class<O> replyClass) {
@@ -460,7 +460,7 @@
}
}
- private final ConnectionHandler LOOPBACK_CONNECTION_HANDLER = new ConnectionHandler()
{
+ private final ConnectionHandler loopbackConnectionHandler = new ConnectionHandler()
{
public Cancellable open(final String serviceName, final String groupName, final
Result<RequestHandler> result) {
// the loopback connection opens a local service
// local services are registered as RequestHandlerConnectors
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java 2009-09-14
19:53:20 UTC (rev 5473)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionHandlerFactory.java 2009-09-14
22:57:51 UTC (rev 5474)
@@ -23,7 +23,10 @@
package org.jboss.remoting3.spi;
/**
+ * A factory which creates the connection handler for a connection. Instances of this
interface are used only
+ * one time to create the single handler instance to correspond to the given local
handler.
*
+ * @remoting.implement
*/
public interface ConnectionHandlerFactory {
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-14
19:53:20 UTC (rev 5473)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProvider.java 2009-09-14
22:57:51 UTC (rev 5474)
@@ -25,7 +25,8 @@
import java.net.URI;
/**
- * A connection provider. Used to establish connections with remote systems.
+ * A connection provider. Used to establish connections with remote systems. There is
typically one instance
+ * of this interface per connection provider factory per endpoint.
*
* @remoting.implement
*/
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java
===================================================================
---
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java 2009-09-14
19:53:20 UTC (rev 5473)
+++
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderFactory.java 2009-09-14
22:57:51 UTC (rev 5474)
@@ -23,7 +23,9 @@
package org.jboss.remoting3.spi;
/**
- * A connection provider factory. Implementations of this interface provide a connection
facility for a URI scheme.
+ * A connection provider factory. Implementations of this interface provide a connection
facility for a URI scheme. An
+ * endpoint will call the {@code createInstance()} method with its provider context when
instances of this interface
+ * are registered on that endpoint.
*/
public interface ConnectionProviderFactory {
Show replies by date