[jboss-remoting-commits] JBoss Remoting SVN: r3993 - in remoting3/trunk: api/src/main/java/org/jboss/cx/remoting/spi/wrapper and 2 other directories.
jboss-remoting-commits at lists.jboss.org
jboss-remoting-commits at lists.jboss.org
Tue Apr 15 22:16:32 EDT 2008
Author: david.lloyd at jboss.com
Date: 2008-04-15 22:16:32 -0400 (Tue, 15 Apr 2008)
New Revision: 3993
Added:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceMarker.java
Removed:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ContextSourceMarker.java
Modified:
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Client.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ClientContext.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreSession.java
remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppBasicExampleMain.java
remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppStreamExampleMain.java
remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalBasicExampleMain.java
remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalStreamExampleMain.java
Log:
Of course I missed a few Context -> Client changes...
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Client.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Client.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Client.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -3,15 +3,14 @@
import java.util.concurrent.ConcurrentMap;
/**
- * A communications context. The context may be associated with a security/authentication state and a transactional
- * state, as well as other state maintained by the remote side.
+ * A communications client. The client may be associated with state maintained by the local and/or remote side.
*/
public interface Client<I, O> extends Closeable<Client<I, O>> {
/**
* Send a request and block until a reply is received.
* <p/>
* Uses the default invocation policy for handling remote invocations. If the remote side manipulates a stream, the
- * current thread MAY be used to handle it.
+ * current thread will be used to handle it by default.
* <p/>
* If the remote session cannot handle the request, a {@code RemotingException} will be thrown.
*
@@ -54,9 +53,9 @@
void sendOneWay(I request) throws RemotingException;
/**
- * Get the context map. This map holds metadata about the current context.
+ * Get the attribute map. This map holds metadata about the current clinet.
*
- * @return the context map
+ * @return the attribute map
*/
ConcurrentMap<Object, Object> getAttributes();
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ClientContext.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ClientContext.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/ClientContext.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -7,7 +7,7 @@
*/
public interface ClientContext extends Closeable<ClientContext> {
/**
- * Get the attributes for this end of the context as a map.
+ * Get the attributes for this end of the channel as a map.
*
* @return the attribute map
*/
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Endpoint.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -71,20 +71,20 @@
Registration registerProtocol(String scheme, ProtocolHandlerFactory protocolHandlerFactory) throws RemotingException, IllegalArgumentException;
/**
- * Create a context that can be used to invoke a request listener on this endpoint. The context may be passed to a
+ * Create a client that can be used to invoke a request listener on this endpoint. The client may be passed to a
* remote endpoint as part of a request or a reply, or it may be used locally.
*
* You must have the TODO permission to invoke this method.
*
* @param requestListener the request listener
- * @return the context
+ * @return the client
*/
- <I, O> Client<I, O> createContext(RequestListener<I, O> requestListener);
+ <I, O> Client<I, O> createClient(RequestListener<I, O> requestListener);
/**
- * Create a context source that can be used to acquire contexts associated with a request listener on this endpoint.
- * The context source may be passed to a remote endpoint as part of a request or a reply, or it may be used locally.
- * The objects that are produced by this method may be used to mass-produce {@code Context} instances.
+ * Create a client source that can be used to acquire clients associated with a request listener on this endpoint.
+ * The client source may be passed to a remote endpoint as part of a request or a reply, or it may be used locally.
+ * The objects that are produced by this method may be used to mass-produce {@code Client} instances.
*
* You must have the TODO permission to invoke this method.
*
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/Session.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -38,9 +38,9 @@
String getRemoteEndpointName();
/**
- * Get the root context for this session.
+ * Get the root client for this session.
*
- * @return the root context
+ * @return the root client
*/
- <I, O> Client<I, O> getRootContext();
+ <I, O> Client<I, O> getRootClient();
}
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/EndpointWrapper.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -46,8 +46,8 @@
return delegate.registerProtocol(scheme, protocolHandlerFactory);
}
- public <I, O> Client<I, O> createContext(final RequestListener<I, O> requestListener) {
- return delegate.createContext(requestListener);
+ public <I, O> Client<I, O> createClient(final RequestListener<I, O> requestListener) {
+ return delegate.createClient(requestListener);
}
public <I, O> ClientSource<I, O> createService(final RequestListener<I, O> requestListener) {
Modified: remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java
===================================================================
--- remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/api/src/main/java/org/jboss/cx/remoting/spi/wrapper/SessionWrapper.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -44,7 +44,7 @@
return delegate.getRemoteEndpointName();
}
- public <I, O> Client<I, O> getRootContext() {
- return delegate.getRootContext();
+ public <I, O> Client<I, O> getRootClient() {
+ return delegate.getRootClient();
}
}
Copied: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceMarker.java (from rev 3985, remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ContextSourceMarker.java)
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceMarker.java (rev 0)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ClientSourceMarker.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -0,0 +1,28 @@
+package org.jboss.cx.remoting.core;
+
+import java.io.Serializable;
+import org.jboss.cx.remoting.spi.protocol.ServiceIdentifier;
+
+/**
+ *
+ */
+public final class ClientSourceMarker implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private ServiceIdentifier serviceIdentifier;
+
+ public ClientSourceMarker() {
+ }
+
+ public ClientSourceMarker(final ServiceIdentifier serviceIdentifier) {
+ this.serviceIdentifier = serviceIdentifier;
+ }
+
+ public ServiceIdentifier getServiceIdentifier() {
+ return serviceIdentifier;
+ }
+
+ public void setServiceIdentifier(final ServiceIdentifier serviceIdentifier) {
+ this.serviceIdentifier = serviceIdentifier;
+ }
+}
\ No newline at end of file
Deleted: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ContextSourceMarker.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ContextSourceMarker.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/ContextSourceMarker.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -1,28 +0,0 @@
-package org.jboss.cx.remoting.core;
-
-import java.io.Serializable;
-import org.jboss.cx.remoting.spi.protocol.ServiceIdentifier;
-
-/**
- *
- */
-public final class ContextSourceMarker implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private ServiceIdentifier serviceIdentifier;
-
- public ContextSourceMarker() {
- }
-
- public ContextSourceMarker(final ServiceIdentifier serviceIdentifier) {
- this.serviceIdentifier = serviceIdentifier;
- }
-
- public ServiceIdentifier getServiceIdentifier() {
- return serviceIdentifier;
- }
-
- public void setServiceIdentifier(final ServiceIdentifier serviceIdentifier) {
- this.serviceIdentifier = serviceIdentifier;
- }
-}
\ No newline at end of file
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -193,7 +193,7 @@
final ProtocolHandlerFactory factory = registration.getProtocolHandlerFactory();
try {
final CoreSession session = new CoreSession(CoreEndpoint.this);
- session.initializeClient(factory, uri, attributeMap, createContext(rootListener));
+ session.initializeClient(factory, uri, attributeMap, createClient(rootListener));
sessions.add(session);
final Session userSession = session.getUserSession();
for (final SessionListener listener : sessionListeners) {
@@ -218,7 +218,7 @@
state.requireHold(State.UP);
try {
final CoreSession session = new CoreSession(CoreEndpoint.this);
- session.initializeServer(handler, createContext(rootListener));
+ session.initializeServer(handler, createClient(rootListener));
sessions.add(session);
return session.getProtocolContext();
} finally {
@@ -247,7 +247,7 @@
}
}
- public <I, O> Client<I, O> createContext(RequestListener<I, O> requestListener) {
+ public <I, O> Client<I, O> createClient(RequestListener<I, O> requestListener) {
final CoreInboundClient<I, O> inbound = new CoreInboundClient<I, O>(requestListener, executor);
final CoreOutboundClient<I, O> outbound = new CoreOutboundClient<I, O>(executor);
inbound.initialize(outbound.getContextClient());
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreSession.java
===================================================================
--- remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreSession.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreSession.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -243,7 +243,7 @@
}
@SuppressWarnings ({"unchecked"})
- public <I, O> Client<I, O> getRootContext() {
+ public <I, O> Client<I, O> getRootClient() {
return (Client<I, O>) rootClient;
}
}
@@ -610,11 +610,11 @@
return new ClientMarker(clientIdentifier);
}
- private final <I, O> ContextSourceMarker doContextSourceReplace(ServiceResponder<I, O> serviceResponder) throws IOException {
+ private final <I, O> ClientSourceMarker doContextSourceReplace(ServiceResponder<I, O> serviceResponder) throws IOException {
final ServiceIdentifier serviceIdentifier = protocolHandler.openService();
final ProtocolServiceInitiatorImpl serviceClient = new ProtocolServiceInitiatorImpl(serviceIdentifier);
new ServerServicePair<I, O>(serviceClient, serviceResponder);
- return new ContextSourceMarker(serviceIdentifier);
+ return new ClientSourceMarker(serviceIdentifier);
}
protected Object replaceObject(Object obj) throws IOException {
Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppBasicExampleMain.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppBasicExampleMain.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppBasicExampleMain.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -26,7 +26,7 @@
Remoting.addJrppServer(endpoint, new InetSocketAddress(12345), AttributeMap.EMPTY);
Session session = endpoint.openSession(new URI("jrpp://localhost:12345"), AttributeMap.EMPTY);
try {
- final Client<String,String> client = session.getRootContext();
+ final Client<String,String> client = session.getRootClient();
try {
final String original = "The Secret Message\n";
final String result = client.invoke(original);
Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppStreamExampleMain.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppStreamExampleMain.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/JrppStreamExampleMain.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -29,7 +29,7 @@
Remoting.addJrppServer(endpoint, new InetSocketAddress(12345), AttributeMap.EMPTY);
Session session = endpoint.openSession(new URI("jrpp://localhost:12345"), AttributeMap.EMPTY);
try {
- final Client<Reader,Reader> client = session.getRootContext();
+ final Client<Reader,Reader> client = session.getRootClient();
try {
final String original = "The Secret Message\n";
final StringReader originalReader = new StringReader(original);
Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalBasicExampleMain.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalBasicExampleMain.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalBasicExampleMain.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -18,7 +18,7 @@
final StringRot13RequestListener listener = new StringRot13RequestListener();
final Endpoint endpoint = Remoting.createEndpoint("simple", listener);
try {
- final Client<String,String> client = endpoint.createContext(listener);
+ final Client<String,String> client = endpoint.createClient(listener);
try {
final String original = "The Secret Message\n";
final String result = client.invoke(original);
Modified: remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalStreamExampleMain.java
===================================================================
--- remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalStreamExampleMain.java 2008-04-16 02:04:26 UTC (rev 3992)
+++ remoting3/trunk/samples/src/main/java/org/jboss/cx/remoting/samples/simple/LocalStreamExampleMain.java 2008-04-16 02:16:32 UTC (rev 3993)
@@ -21,7 +21,7 @@
final StreamingRot13RequestListener listener = new StreamingRot13RequestListener();
final Endpoint endpoint = Remoting.createEndpoint("simple", listener);
try {
- final Client<Reader,Reader> client = endpoint.createContext(listener);
+ final Client<Reader,Reader> client = endpoint.createClient(listener);
try {
final String original = "The Secret Message\n";
final StringReader originalReader = new StringReader(original);
More information about the jboss-remoting-commits
mailing list