You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by ha...@apache.org on 2003/01/06 00:24:58 UTC
cvs commit: jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server Authenticator.java ProxyGenerator.java Publisher.java ServerConnection.java ServerException.java AltrmiAuthenticator.java AltrmiProxyGenerator.java AltrmiPublisher.java AltrmiServerConnection.java AltrmiServerException.java
hammant 2003/01/05 15:24:58
Modified: altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket
AbstractCompleteSocketStreamServer.java
CompleteSocketCustomStreamPipedBinder.java
CompleteSocketCustomStreamPipedConnection.java
CompleteSocketCustomStreamServer.java
CompleteSocketObjectStreamPipedBinder.java
CompleteSocketObjectStreamPipedConnection.java
CompleteSocketObjectStreamServer.java
PartialSocketCustomStreamServer.java
PartialSocketObjectStreamServer.java
altrmi/src/test/org/apache/excalibur/altrmi/client/impl
DummyInvocationHandler.java
altrmi/src/test/org/apache/excalibur/altrmi/test/generator
TestInvocationHandler.java
altrmi/src/test/org/apache/excalibur/altrmi/test/invalidstate
BouncingServerTestCase.java
Added: altrmi/src/java/org/apache/excalibur/altrmi/common
Authentication.java AuthenticationException.java
CallbackException.java ConnectionException.java
InvocationException.java InvocationHandler.java
MarshalledInvocationHandler.java Reply.java
ReplyConstants.java Request.java
RequestConstants.java
altrmi/src/java/org/apache/excalibur/altrmi/server
Authenticator.java ProxyGenerator.java
Publisher.java ServerConnection.java
ServerException.java
Removed: altrmi/src/java/org/apache/excalibur/altrmi/common
AltrmiAuthentication.java
AltrmiAuthenticationException.java
AltrmiCallbackException.java
AltrmiConnectionException.java
AltrmiInvocationException.java
AltrmiInvocationHandler.java
AltrmiMarshalledInvocationHandler.java
AltrmiReply.java AltrmiReplyConstants.java
AltrmiRequest.java AltrmiRequestConstants.java
altrmi/src/java/org/apache/excalibur/altrmi/server
AltrmiAuthenticator.java AltrmiProxyGenerator.java
AltrmiPublisher.java AltrmiServerConnection.java
AltrmiServerException.java
Log:
More renames. AltrMI purged as prefix in 90% of cases.
Revision Changes Path
1.8 +8 -8 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java
Index: AbstractCompleteSocketStreamServer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/AbstractCompleteSocketStreamServer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AbstractCompleteSocketStreamServer.java 13 Oct 2002 11:54:27 -0000 1.7
+++ AbstractCompleteSocketStreamServer.java 5 Jan 2003 23:24:54 -0000 1.8
@@ -10,7 +10,7 @@
import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.server.impl.AbstractServer;
import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
@@ -43,10 +43,10 @@
*
* @param port The port to use
*
- * @throws AltrmiServerException If a problem during instantiation.
+ * @throws ServerException If a problem during instantiation.
*
*/
- public AbstractCompleteSocketStreamServer( int port ) throws AltrmiServerException
+ public AbstractCompleteSocketStreamServer( int port ) throws ServerException
{
try
@@ -56,7 +56,7 @@
}
catch( IOException ioe )
{
- throw new AltrmiServerException( "Some problem setting up server : "
+ throw new ServerException( "Some problem setting up server : "
+ ioe.getMessage() );
}
}
@@ -68,12 +68,12 @@
* @param invocationHandlerAdapter The invocation handler adapter to use.
* @param port The port to use
*
- * @throws AltrmiServerException If a problem during instantiation.
+ * @throws ServerException If a problem during instantiation.
*
*/
public AbstractCompleteSocketStreamServer(
InvocationHandlerAdapter invocationHandlerAdapter, int port )
- throws AltrmiServerException
+ throws ServerException
{
super( invocationHandlerAdapter );
@@ -84,7 +84,7 @@
}
catch( IOException ioe )
{
- throw new AltrmiServerException( "Some problem setting up server : "
+ throw new ServerException( "Some problem setting up server : "
+ ioe.getMessage() );
}
}
1.3 +2 -2 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamPipedBinder.java
Index: CompleteSocketCustomStreamPipedBinder.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamPipedBinder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompleteSocketCustomStreamPipedBinder.java 7 Nov 2002 07:57:34 -0000 1.2
+++ CompleteSocketCustomStreamPipedBinder.java 5 Jan 2003 23:24:54 -0000 1.3
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
import org.apache.excalibur.altrmi.registry.Binder;
import org.apache.excalibur.altrmi.registry.BindException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.util.Vector;
import java.io.PipedInputStream;
@@ -54,7 +54,7 @@
m_connections.add(connection);
return connection;
}
- catch (AltrmiConnectionException e)
+ catch (ConnectionException e)
{
throw new BindException("Problem binding: " + e.getMessage());
}
1.3 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamPipedConnection.java
Index: CompleteSocketCustomStreamPipedConnection.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamPipedConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompleteSocketCustomStreamPipedConnection.java 7 Nov 2002 07:57:34 -0000 1.2
+++ CompleteSocketCustomStreamPipedConnection.java 5 Jan 2003 23:24:54 -0000 1.3
@@ -9,7 +9,7 @@
import org.apache.excalibur.altrmi.server.impl.piped.PipedCustomStreamServer;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
@@ -31,14 +31,14 @@
* @param completeSocketCustomStreamPipedBinder The binder that controls this connection
* @param inputStream the piped input stream
* @param outputStream the piped output stream
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
public CompleteSocketCustomStreamPipedConnection
(
InvocationHandlerAdapter invocationHandlerAdapter,
CompleteSocketCustomStreamPipedBinder completeSocketCustomStreamPipedBinder,
PipedInputStream inputStream,
- PipedOutputStream outputStream) throws AltrmiConnectionException
+ PipedOutputStream outputStream) throws ConnectionException
{
m_pipedCustomStreamServer = new PipedCustomStreamServer(invocationHandlerAdapter);
m_pipedCustomStreamServer.start();
1.7 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamServer.java
Index: CompleteSocketCustomStreamServer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketCustomStreamServer.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CompleteSocketCustomStreamServer.java 7 Nov 2002 07:57:34 -0000 1.6
+++ CompleteSocketCustomStreamServer.java 5 Jan 2003 23:24:54 -0000 1.7
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.altrmi.server.impl.socket;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.server.impl.ServerCustomStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
@@ -30,10 +30,10 @@
*
* @param port The port to use
*
- * @throws AltrmiServerException If a problem instantiating.
+ * @throws ServerException If a problem instantiating.
*
*/
- public CompleteSocketCustomStreamServer( int port ) throws AltrmiServerException
+ public CompleteSocketCustomStreamServer( int port ) throws ServerException
{
super( port );
new RegistryHelper().put("/.altrmi/optimizations/port=" + port,
@@ -46,12 +46,12 @@
* @param invocationHandlerAdapter The invocation handler to use.
* @param port The port to use
*
- * @throws AltrmiServerException If a problem instantiating.
+ * @throws ServerException If a problem instantiating.
*
*/
public CompleteSocketCustomStreamServer(
InvocationHandlerAdapter invocationHandlerAdapter, int port )
- throws AltrmiServerException
+ throws ServerException
{
super( invocationHandlerAdapter, port );
new RegistryHelper().put("/.altrmi/optimizations/port=" + port,
1.3 +2 -2 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamPipedBinder.java
Index: CompleteSocketObjectStreamPipedBinder.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamPipedBinder.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompleteSocketObjectStreamPipedBinder.java 7 Nov 2002 07:57:34 -0000 1.2
+++ CompleteSocketObjectStreamPipedBinder.java 5 Jan 2003 23:24:54 -0000 1.3
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
import org.apache.excalibur.altrmi.registry.Binder;
import org.apache.excalibur.altrmi.registry.BindException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.util.Vector;
import java.io.PipedInputStream;
@@ -54,7 +54,7 @@
m_connections.add(connection);
return connection;
}
- catch (AltrmiConnectionException e)
+ catch (ConnectionException e)
{
throw new BindException("Problem binding: " + e.getMessage());
}
1.3 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamPipedConnection.java
Index: CompleteSocketObjectStreamPipedConnection.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamPipedConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CompleteSocketObjectStreamPipedConnection.java 7 Nov 2002 07:57:34 -0000 1.2
+++ CompleteSocketObjectStreamPipedConnection.java 5 Jan 2003 23:24:54 -0000 1.3
@@ -9,7 +9,7 @@
import org.apache.excalibur.altrmi.server.impl.piped.PipedObjectStreamServer;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
@@ -31,14 +31,14 @@
* @param completeSocketObjectStreamPipedBinder The binder that controls this connection
* @param inputStream the piped input stream
* @param outputStream the piped output stream
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
public CompleteSocketObjectStreamPipedConnection
(
InvocationHandlerAdapter invocationHandlerAdapter,
CompleteSocketObjectStreamPipedBinder completeSocketObjectStreamPipedBinder,
PipedInputStream inputStream,
- PipedOutputStream outputStream) throws AltrmiConnectionException
+ PipedOutputStream outputStream) throws ConnectionException
{
m_pipedObjectStreamServer = new PipedObjectStreamServer(invocationHandlerAdapter);
m_completeSocketObjectStreamPipedBinder = completeSocketObjectStreamPipedBinder;
1.4 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamServer.java
Index: CompleteSocketObjectStreamServer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/CompleteSocketObjectStreamServer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CompleteSocketObjectStreamServer.java 21 Sep 2002 15:52:57 -0000 1.3
+++ CompleteSocketObjectStreamServer.java 5 Jan 2003 23:24:54 -0000 1.4
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.altrmi.server.impl.socket;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.server.impl.ServerObjectStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
@@ -36,10 +36,10 @@
*
* @param port The port to use.
*
- * @throws AltrmiServerException If a problem instantiating.
+ * @throws ServerException If a problem instantiating.
*
*/
- public CompleteSocketObjectStreamServer( int port ) throws AltrmiServerException
+ public CompleteSocketObjectStreamServer( int port ) throws ServerException
{
super( port );
}
@@ -52,12 +52,12 @@
* @param objectInputStreamClassName The overriding class to use for InputStreams
* @param objectOutputStreamClassName The overriding class to use for OutputStreams
*
- * @throws AltrmiServerException If a problem instantiating.
+ * @throws ServerException If a problem instantiating.
*
*/
public CompleteSocketObjectStreamServer(
int port, String objectInputStreamClassName, String objectOutputStreamClassName )
- throws AltrmiServerException
+ throws ServerException
{
super( port );
1.8 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/PartialSocketCustomStreamServer.java
Index: PartialSocketCustomStreamServer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/PartialSocketCustomStreamServer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PartialSocketCustomStreamServer.java 7 Nov 2002 07:57:34 -0000 1.7
+++ PartialSocketCustomStreamServer.java 5 Jan 2003 23:24:54 -0000 1.8
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.server.impl.ServerCustomStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.common.RegistryHelper;
/**
@@ -29,9 +29,9 @@
/**
* Construct a PartialSocketCustomStreamServer
* @param port the port for the socketserver.
- * @throws AltrmiServerException if a problem
+ * @throws ServerException if a problem
*/
- public PartialSocketCustomStreamServer(int port) throws AltrmiServerException
+ public PartialSocketCustomStreamServer(int port) throws ServerException
{
m_completeSocketCustomStreamPipedBinder =
1.8 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/PartialSocketObjectStreamServer.java
Index: PartialSocketObjectStreamServer.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/socket/PartialSocketObjectStreamServer.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PartialSocketObjectStreamServer.java 7 Nov 2002 07:57:34 -0000 1.7
+++ PartialSocketObjectStreamServer.java 5 Jan 2003 23:24:54 -0000 1.8
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.server.impl.ServerObjectStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.ServerStreamReadWriter;
import org.apache.excalibur.altrmi.server.impl.adapters.InvocationHandlerAdapter;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.common.RegistryHelper;
@@ -31,9 +31,9 @@
* Construct a PartialSocketObjectStreamServer
*
* @param port the port
- * @throws AltrmiServerException if a problem
+ * @throws ServerException if a problem
*/
- public PartialSocketObjectStreamServer(int port) throws AltrmiServerException
+ public PartialSocketObjectStreamServer(int port) throws ServerException
{
m_completeSocketObjectStreamPipedBinder =
new CompleteSocketObjectStreamPipedBinder(super.getInovcationHandlerAdapter());
1.6 +5 -5 jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/client/impl/DummyInvocationHandler.java
Index: DummyInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/client/impl/DummyInvocationHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DummyInvocationHandler.java 5 Jan 2003 23:11:40 -0000 1.5
+++ DummyInvocationHandler.java 5 Jan 2003 23:24:54 -0000 1.6
@@ -7,9 +7,9 @@
*/
package org.apache.excalibur.altrmi.client.impl;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.client.ConnectionListener;
import org.apache.excalibur.altrmi.client.ConnectionPinger;
@@ -31,7 +31,7 @@
pinged = false;
}
- public AltrmiReply handleInvocation(AltrmiRequest request)
+ public Reply handleInvocation(Request request)
{
throw new java.lang.UnsupportedOperationException();
}
@@ -62,7 +62,7 @@
throw new java.lang.UnsupportedOperationException();
}
- public void initialize() throws AltrmiConnectionException
+ public void initialize() throws ConnectionException
{
throw new java.lang.UnsupportedOperationException();
}
1.7 +4 -4 jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestInvocationHandler.java
Index: TestInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/generator/TestInvocationHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- TestInvocationHandler.java 5 Jan 2003 23:11:40 -0000 1.6
+++ TestInvocationHandler.java 5 Jan 2003 23:24:54 -0000 1.7
@@ -11,8 +11,8 @@
import java.lang.reflect.Method;
import org.apache.excalibur.altrmi.client.impl.AbstractClientInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.ExceptionReply;
import org.apache.excalibur.altrmi.common.MethodReply;
import org.apache.excalibur.altrmi.common.MethodRequest;
@@ -27,9 +27,9 @@
public class TestInvocationHandler extends AbstractClientInvocationHandler{
/*
- * @see AltrmiInvocationHandler#handleInvocation(AltrmiRequest)
+ * @see InvocationHandler#handleInvocation(Request)
*/
- public AltrmiReply handleInvocation(AltrmiRequest request) {
+ public Reply handleInvocation(Request request) {
if(request instanceof OpenConnectionRequest)
{
return new OpenConnectionReply();
1.3 +2 -2 jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/invalidstate/BouncingServerTestCase.java
Index: BouncingServerTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/test/org/apache/excalibur/altrmi/test/invalidstate/BouncingServerTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BouncingServerTestCase.java 5 Jan 2003 23:11:40 -0000 1.2
+++ BouncingServerTestCase.java 5 Jan 2003 23:24:54 -0000 1.3
@@ -10,7 +10,7 @@
import junit.framework.TestCase;
import org.apache.excalibur.altrmi.server.impl.socket.CompleteSocketCustomStreamServer;
import org.apache.excalibur.altrmi.server.PublicationDescription;
-import org.apache.excalibur.altrmi.server.AltrmiServerException;
+import org.apache.excalibur.altrmi.server.ServerException;
import org.apache.excalibur.altrmi.server.PublicationException;
import org.apache.excalibur.altrmi.test.TestInterfaceImpl;
import org.apache.excalibur.altrmi.test.TestInterface;
@@ -89,7 +89,7 @@
}
}
- private CompleteSocketCustomStreamServer startServer() throws AltrmiServerException, PublicationException
+ private CompleteSocketCustomStreamServer startServer() throws ServerException, PublicationException
{
CompleteSocketCustomStreamServer server = new CompleteSocketCustomStreamServer(12101);
TestInterfaceImpl testServer = new TestInterfaceImpl();
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/Authentication.java
Index: Authentication.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
import java.io.Externalizable;
/**
* Class Authentication
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public abstract class Authentication implements Externalizable
{
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/AuthenticationException.java
Index: AuthenticationException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Class AuthenticationException
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public class AuthenticationException extends ConnectionException
{
/**
* Constructor AuthenticationException
*
*
* @param msg message that is the cause root of the exception
*
*/
public AuthenticationException( String msg )
{
super( msg );
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/CallbackException.java
Index: CallbackException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* CallbackException occurs on failure to expose
* the object for calbacks
*
*
* @author <a href="mailto:vinayc77@yahoo.com">Vinay Chandran</a>
* @version $Revision: 1.1 $
*/
public class CallbackException extends Exception
{
/**
* Constructor CallbackException
*
*
* @param msg the message that is the root cause of the exception.
*
*/
public CallbackException( String msg )
{
super( msg );
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ConnectionException.java
Index: ConnectionException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Class ConnectionException
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public class ConnectionException extends Exception
{
// For the time being, this is backwards compatible with 1.3. It could
// just as easily use the 1.4 constructors for Exception.
private Throwable m_throwableCause;
/**
* Constructor ConnectionException
*
*
* @param msg the message that is the root cause.
*
*/
public ConnectionException( String msg )
{
super( msg );
}
public ConnectionException(String message, Throwable cause)
{
super(message);
m_throwableCause = cause;
}
public Throwable getCause()
{
return m_throwableCause;
}
public String getMessage()
{
return super.getMessage() + (m_throwableCause != null ? " : " + m_throwableCause.getMessage() : "");
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/InvocationException.java
Index: InvocationException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
import java.io.Serializable;
/**
* Class InvocationException
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public class InvocationException extends RuntimeException implements Serializable
{
private Throwable m_throwableCause;
/**
* Constructor InvocationException
*
*
* @param msg the message that is the root cause.
*
*/
public InvocationException( String msg )
{
super( msg );
}
public InvocationException(String message, Throwable cause)
{
super(message);
m_throwableCause = cause;
}
public Throwable getCause()
{
return m_throwableCause;
}
public String getMessage()
{
return super.getMessage() + (m_throwableCause != null ? " : " + m_throwableCause.getMessage() : "");
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/InvocationHandler.java
Index: InvocationHandler.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Interface InvocationHandler
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface InvocationHandler
{
/**
* Handle a method invocation
*
*
* @param request The request to handle
*
* @return the reply that is a consequence of the request
*
*/
Reply handleInvocation( Request request );
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/MarshalledInvocationHandler.java
Index: MarshalledInvocationHandler.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Interface MarshalledInvocationHandler
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface MarshalledInvocationHandler
{
/**
* Handle a method Invocation using byte array representations of the request and reply
*
*
* @param request a byte array representing a request
*
* @return a byte array representing the reply
*
*/
byte[] handleInvocation( byte[] request );
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/Reply.java
Index: Reply.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Class Reply
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public abstract class Reply implements Externalizable
{
/**
* Gets number that represents type for this class.
* This is quicker than instanceof for type checking.
*
* @return the representative code
* @see ReplyConstants
*
*/
public abstract int getReplyCode();
/**
* The object implements the writeExternal method to save its contents
* by calling the methods of DataOutput for its primitive values or
* calling the writeObject method of ObjectOutput for objects, strings,
* and arrays.
*
* @serialData Overriding methods should use this tag to describe
* the data layout of this Externalizable object.
* List the sequence of element types and, if possible,
* relate the element to a public/protected field and/or
* method of this Externalizable class.
*
* @param out the stream to write the object to
* @exception IOException Includes any I/O exceptions that may occur
*/
public void writeExternal( ObjectOutput out ) throws IOException
{
}
/**
* The object implements the readExternal method to restore its
* contents by calling the methods of DataInput for primitive
* types and readObject for objects, strings and arrays. The
* readExternal method must read the values in the same sequence
* and with the same types as were written by writeExternal.
*
* @param in the stream to read data from in order to restore the object
* @exception IOException if I/O errors occur
* @exception ClassNotFoundException If the class for an object being
* restored cannot be found.
*/
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
{
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/ReplyConstants.java
Index: ReplyConstants.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Interface ReplyConstants
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface ReplyConstants
{
// 'good' replies after 100
/**
* A reply of type class (generated proxy)
*/
int CLASSREPLY = 1;
/**
* A reply of type method
*/
int METHODREPLY = 2;
/**
* A reply of type exception
*/
int EXCEPTIONREPLY = 3;
/**
* A reply of type lookup
*/
int LOOKUPREPLY = 4;
/**
* A reply of facade as a result of a method request
*/
int METHODFACADEREPLY = 5;
/**
* An ack on open of connection
*/
int OPENCONNECTIONREPLY = 6;
/**
* An ack on simple ping
*/
int PINGREPLY = 7;
/**
* A list of published services
*/
int LISTREPLY = 8;
/**
* A reply of and array of facades
*/
int METHODFACADEARRAYREPLY = 9;
/**
* A grabage collection reply
*/
int GCREPLY = 10;
/**
* An instruction try again in local modes. Used instread of an OpenConnectionReply.
*/
int SAMEVMREPLY = 11;
/**
* The list of remote methods within the published Object
*/
int LISTMETHODSREPLY=12;
// 'bad' replies after 100
/**
* A some type of problem occured.
*/
int PROBLEMREPLY = 100;
/**
* The service requested was not published
*/
int NOTPUBLISHEDREPLY = 102;
/**
* The request failed
*/
int REQUESTFAILEDREPLY = 103;
/**
* The service is suspended
*/
int SUSPENDEDREPLY = 104;
/**
* The connection has been ended
*/
int ENDCONNECTIONREPLY = 105;
/**
* There is no such reference
*/
int NOSUCHREFERENCEREPLY = 106;
/**
* The proxy class could not be retrieved.
*/
int CLASSRETRIEVALFAILEDREPLY = 107;
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/Request.java
Index: Request.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
/**
* Class Request
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public abstract class Request implements Externalizable
{
/**
* Gets number that represents type for this class.
* This is quicker than instanceof for type checking.
*
* @return the representative code
* @see RequestConstants
*
*/
public abstract int getRequestCode();
/**
* The object implements the writeExternal method to save its contents
* by calling the methods of DataOutput for its primitive values or
* calling the writeObject method of ObjectOutput for objects, strings,
* and arrays.
*
* @serialData Overriding methods should use this tag to describe
* the data layout of this Externalizable object.
* List the sequence of element types and, if possible,
* relate the element to a public/protected field and/or
* method of this Externalizable class.
*
* @param out the stream to write the object to
* @exception IOException Includes any I/O exceptions that may occur
*/
public void writeExternal( ObjectOutput out ) throws IOException
{
}
/**
* The object implements the readExternal method to restore its
* contents by calling the methods of DataInput for primitive
* types and readObject for objects, strings and arrays. The
* readExternal method must read the values in the same sequence
* and with the same types as were written by writeExternal.
*
* @param in the stream to read data from in order to restore the object
* @exception IOException if I/O errors occur
* @exception ClassNotFoundException If the class for an object being
* restored cannot be found.
*/
public void readExternal( ObjectInput in ) throws IOException, ClassNotFoundException
{
}
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/common/RequestConstants.java
Index: RequestConstants.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.common;
/**
* Interface RequestConstants a set of constants for requests over AltRMI.
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $*
*/
public interface RequestConstants
{
/**
* A request for a class
*/
int CLASSREQUEST = 301;
/**
* A method request
*/
int METHODREQUEST = 302;
/**
* A method request to a facade
*/
int METHODFACADEREQUEST = 303;
/**
* A initial lookup of a service.
*/
int LOOKUPREQUEST = 304;
/**
* An initial opening of connection
*/
int OPENCONNECTIONREQUEST = 305;
/**
* A ping to keep the connection alive
*/
int PINGREQUEST = 306;
/**
* A list of published services
*/
int LISTREQUEST = 307;
/**
* A request for garbage collection for a finished with proxy
*/
int GCREQUEST = 308;
/**
* A request for listing the methods within the publishedName
*/
int LISTMETHODSREQUEST=309;
/**
* A method request
*/
int METHODASYNCREQUEST = 310;
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/Authenticator.java
Index: Authenticator.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.server;
import org.apache.excalibur.altrmi.common.Authentication;
import org.apache.excalibur.altrmi.common.AuthenticationException;
/**
* Interface Authenticator
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface Authenticator
{
/**
* Check the authority of a particular 'user' to a service
*
*
* @param auth the authenicatin that needs to be checked.
* @param publishedService the name of the published service.
*
*
* @throws AuthenticationException if autheication fails.
*
*/
void checkAuthority( Authentication auth, String publishedService )
throws AuthenticationException;
/**
* Get the text to sign for PKI style autheticators
*
*
* @return the signed text.
*
*/
String getTextToSign();
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/ProxyGenerator.java
Index: ProxyGenerator.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.server;
/**
* Interface ProxyGenerator
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface ProxyGenerator
{
/**
* Generate a proxy.
*
*
* @param asName the name of the generated proxy. As used in lookup.
* @param interfaceToExpose the princial lookupable interface
* @param classLoader - classloader containing all needed for proxy generation
* @throws PublicationException if there is a problem publishing
*
*/
void generate( String asName, Class interfaceToExpose, ClassLoader classLoader )
throws PublicationException;
/**
* Generate a proxy.
*
*
* @param asName the name of the generated proxy. As used in lookup.
* @param publicationDescription a descriptor detailing complex cases.
* @param classLoader - classloader containing all needed for proxy generation
* @throws PublicationException if there is a problem publishing
*
*/
void generate(
String asName, PublicationDescription publicationDescription, ClassLoader classLoader )
throws PublicationException;
/**
* Generate a proxy. Deferred till a later moment for performance reasons (most of
* use with javac generator)
*
*
* @param asName the name of the generated proxy. As used in lookup.
* @param publicationDescription a descriptor detailing complex cases.
* @param classLoader - classloader containing all needed for proxy generation
* @throws PublicationException if there is a problem publishing
*
*/
void deferredGenerate(
String asName, PublicationDescription publicationDescription, ClassLoader classLoader )
throws PublicationException;
/**
* Generate the deferred proxies.
*
* @param classLoader the class loader.
*/
void generateDeferred( ClassLoader classLoader );
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/Publisher.java
Index: Publisher.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.server;
import org.apache.excalibur.altrmi.common.MethodRequest;
/**
* Interface AltrmiServer
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @author Vinay Chandrasekharan <a href="mailto:vinayc77@yahoo.com">vinayc77@yahoo.com</a>
*
* @version * $Revision: 1.1 $
*/
public interface Publisher
{
/**
* Publish a object for subsequent lookup.
*
*
* @param impl the object implementing the principle interface.
* @param asName the lookup name of the published object
* @param interfaceToExpose the principal interface being published
* @throws PublicationException if there is a problem publishing
*
*/
void publish( Object impl, String asName, Class interfaceToExpose ) throws PublicationException;
/**
* Publish a object for subsequent lookup.
*
*
* @param impl the object implementing the principle interface.
* @param asName the lookup name of the published object
* @param publicationDescription describing complex publishing cases.
* @throws PublicationException if there is a problem publishing
*
*/
void publish( Object impl, String asName, PublicationDescription publicationDescription )
throws PublicationException;
/**
* UnPublish a previously published object.
*
*
* @param impl the object implementing the principle interface.
* @param publishedName the lookup name of the published object
* @throws PublicationException if there is a problem publishing
*
*/
void unPublish( Object impl, String publishedName ) throws PublicationException;
/**
* Replace Published object with another.
*
*
* @param oldImpl the old object implementing the principle interface.
* @param publishedName the lookup name of the published object
* @param withImpl the new object implementing the principle interface.
* @throws PublicationException if there is a problem publishing
*
*/
void replacePublished( Object oldImpl, String publishedName, Object withImpl )
throws PublicationException;
/**
* Get the MethodInvocationHandler for this transport. Used in special adaptors.
*
*
* @param methodRequest used as a hint for getting the right handler.
* @param objectName the object name relating to the method request.
*
* @return a suitable MethodInvocationHandler
*
*/
MethodInvocationHandler getMethodInvocationHandler( MethodRequest methodRequest,
String objectName );
/**
* Get the MethodInvocationHandler for a published lookup name. Used in special adaptors.
*
*
* @param publishedName the published lookup name.
*
* @return a suitable MethodInvocationHandler
*
*/
MethodInvocationHandler getMethodInvocationHandler( String publishedName );
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/ServerConnection.java
Index: ServerConnection.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.server;
/**
* An ServerConnection is connection in progress from a client to a server.
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision: 1.1 $
*/
public interface ServerConnection
{
/**
* End the connection.
*
*
*/
void endConnection();
}
1.1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/ServerException.java
Index: ServerException.java
===================================================================
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.excalibur.altrmi.server;
/**
* Class ServerException
*
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision: 1.1 $
*/
public class ServerException extends Exception
{
/**
* Construct an ServerException with a message
*
*
* @param message the message
*
*/
public ServerException( String message )
{
super( message );
}
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>