Author: david.lloyd(a)jboss.com
Date: 2008-07-18 19:28:49 -0400 (Fri, 18 Jul 2008)
New Revision: 4397
Modified:
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java
Log:
More generic fixups
Modified:
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java
===================================================================
---
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-07-18
23:23:07 UTC (rev 4396)
+++
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicHandler.java 2008-07-18
23:28:49 UTC (rev 4397)
@@ -90,7 +90,6 @@
private final ObjectResolver resolver;
private final ClassLoader classLoader;
- @SuppressWarnings({ "unchecked" })
public BasicHandler(final boolean server, final BufferAllocator<ByteBuffer>
allocator, final RemoteClientEndpoint root, final Executor executor, final
RemoteClientEndpointListener remoteListener, final MarshallerFactory<ByteBuffer>
marshallerFactory) throws RemotingException {
this.server = server;
this.allocator = allocator;
@@ -427,11 +426,11 @@
return id;
}
- @SuppressWarnings({ "unchecked" })
public void openClientForForwardedService(int id, RemoteClientEndpoint
clientEndpoint) {
try {
- forwardedClients.put(Integer.valueOf(id),
((RemoteClientEndpoint)clientEndpoint).getHandle());
+ forwardedClients.put(Integer.valueOf(id), clientEndpoint.getHandle());
} catch (RemotingException e) {
+ // TODO fix
e.printStackTrace();
}
}
Modified:
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java
===================================================================
---
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java 2008-07-18
23:23:07 UTC (rev 4396)
+++
remoting3/trunk/protocol/basic/src/main/java/org/jboss/cx/remoting/protocol/basic/BasicProtocol.java 2008-07-18
23:28:49 UTC (rev 4397)
@@ -82,8 +82,6 @@
/**
* Create a request client for the basic protocol.
*
- * @param <I> the request type of the new remote root service endpoint
- * @param <O> the reply type of the new remote root service endpoint
* @param executor the executor to use for invocations
* @param localRoot the client endpoint to use as the local root client
* @param channelSource the XNIO channel source to use to establish the connection
@@ -91,11 +89,10 @@
* @return the future client endpoint of the remote side's root client
* @throws IOException if an error occurs
*/
- public static <I, O> IoFuture<RemoteClientEndpoint> connect(final
Executor executor, final RemoteClientEndpoint localRoot, final
ChannelSource<AllocatedMessageChannel> channelSource, final
BufferAllocator<ByteBuffer> allocator) throws IOException {
+ public static IoFuture<RemoteClientEndpoint> connect(final Executor executor,
final RemoteClientEndpoint localRoot, final ChannelSource<AllocatedMessageChannel>
channelSource, final BufferAllocator<ByteBuffer> allocator) throws IOException {
final BasicHandler basicHandler = new BasicHandler(false, allocator, localRoot,
executor, null, new JavaSerializationMarshallerFactory(executor));
final IoFuture<AllocatedMessageChannel> futureChannel =
channelSource.open(basicHandler);
return new AbstractConvertingIoFuture<RemoteClientEndpoint,
AllocatedMessageChannel>(futureChannel) {
- @SuppressWarnings({ "unchecked" })
protected RemoteClientEndpoint convert(final AllocatedMessageChannel channel)
throws RemotingException {
final RemoteClientEndpoint remoteClientEndpoint =
basicHandler.getRemoteClient(0);
return (RemoteClientEndpoint) remoteClientEndpoint;
Show replies by date