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:10 UTC
cvs commit: jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped AbstractPipedStreamInvocationHandler.java PipedCustomStreamHostContext.java PipedCustomStreamInvocationHandler.java
hammant 2003/01/05 15:24:10
Modified: altrmi/src/java/org/apache/excalibur/altrmi/blocks/authentication
DefaultAuthenticator.java
altrmi/src/java/org/apache/excalibur/altrmi/blocks/autopublishing
AutoPublisher.java
altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing
AbstractPublisher.java RmiPublisher.java
SocketStreamPublisher.java
altrmi/src/java/org/apache/excalibur/altrmi/blocks/subscription
AbstractSubscriber.java
altrmi/src/java/org/apache/excalibur/altrmi/client
AbstractSubscriber.java AltrmiFactory.java
CallbackEnabledClientInvocationHandler.java
ClientInvocationHandler.java
ConnectionListener.java InterfaceLookup.java
InterfaceLookupFactory.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl
AbstractAltrmiFactory.java
AbstractClientInvocationHandler.java
AbstractConnectionPinger.java
AbstractFactoryHelper.java
AbstractInterfaceLookupFactory.java
AbstractSameVmBindableHostContext.java
ClientClassAltrmiFactory.java
ClientStreamReadWriter.java
DefaultConnectionListener.java
DefaultProxyHelper.java DumbConnectionListener.java
DynamicClassAltrmiFactory.java DynamicInvoker.java
DynamicStub.java ServerClassAltrmiFactory.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket
CallbackEnabledSocketCustomStreamHostContext.java
CallbackEnabledSocketCustomStreamInvocationHandler.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream
CallbackEnabledClientCustomStreamReadWriter.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct
AbstractDirectInvocationHandler.java
DirectHostContext.java DirectInvocationHandler.java
DirectMarshalledHostContext.java
DirectMarshalledInvocationHandler.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http
ClientHttpReadWriter.java
CustomHttpHostContext.java
CustomHttpInvocationHandler.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple
AbstractMultipleInvocationHandler.java
RotatingMultipleInvocationHandler.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming
DefaultAltrmiContext.java
altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped
AbstractPipedStreamInvocationHandler.java
PipedCustomStreamHostContext.java
PipedCustomStreamInvocationHandler.java
Log:
More renames. AltrMI purged as prefix in 90% of cases.
Revision Changes Path
1.3 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/authentication/DefaultAuthenticator.java
Index: DefaultAuthenticator.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/authentication/DefaultAuthenticator.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DefaultAuthenticator.java 3 Jan 2003 00:17:16 -0000 1.2
+++ DefaultAuthenticator.java 5 Jan 2003 23:24:07 -0000 1.3
@@ -9,21 +9,21 @@
//org.apache.avalon.excalibur.altrmi.blocks.authentication.DefaultAuthenticator
import org.apache.avalon.framework.activity.Initializable;
-import org.apache.excalibur.altrmi.common.AltrmiAuthentication;
-import org.apache.excalibur.altrmi.common.AltrmiAuthenticationException;
-import org.apache.excalibur.altrmi.server.AltrmiAuthenticator;
+import org.apache.excalibur.altrmi.common.Authentication;
+import org.apache.excalibur.altrmi.common.AuthenticationException;
+import org.apache.excalibur.altrmi.server.Authenticator;
/**
* @phoenix:block
- * @phoenix:service name="org.apache.excalibur.altrmi.server.AltrmiAuthenticator"
+ * @phoenix:service name="org.apache.excalibur.altrmi.server.Authenticator"
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision$
*/
public class DefaultAuthenticator
- implements AltrmiAuthenticator, Initializable
+ implements Authenticator, Initializable
{
- private AltrmiAuthenticator m_altrmiAuthenticator;
+ private Authenticator m_altrmiAuthenticator;
/**
* Initialialize the component. Initialization includes
@@ -39,8 +39,8 @@
new org.apache.excalibur.altrmi.server.impl.DefaultAuthenticator();
}
- public void checkAuthority( AltrmiAuthentication authentication, String publishedName )
- throws AltrmiAuthenticationException
+ public void checkAuthority( Authentication authentication, String publishedName )
+ throws AuthenticationException
{
m_altrmiAuthenticator.checkAuthority( authentication, publishedName );
}
1.2 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/autopublishing/AutoPublisher.java
Index: AutoPublisher.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/autopublishing/AutoPublisher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AutoPublisher.java 27 Dec 2002 00:07:28 -0000 1.1
+++ AutoPublisher.java 5 Jan 2003 23:24:07 -0000 1.2
@@ -18,7 +18,7 @@
import org.apache.avalon.phoenix.ApplicationEvent;
import org.apache.avalon.phoenix.ApplicationListener;
import org.apache.avalon.phoenix.BlockEvent;
-import org.apache.excalibur.altrmi.server.AltrmiPublisher;
+import org.apache.excalibur.altrmi.server.Publisher;
import org.apache.excalibur.altrmi.server.PublicationException;
/**
@@ -32,7 +32,7 @@
implements Configurable, ApplicationListener
{
private String m_publisherName;
- private AltrmiPublisher m_altrmiPublisher;
+ private Publisher m_altrmiPublisher;
private Map m_publications;
private Vector m_events = new Vector();
@@ -62,7 +62,7 @@
{
if( m_publisherName.equals( event.getName() ) )
{
- m_altrmiPublisher = (AltrmiPublisher)event.getBlock();
+ m_altrmiPublisher = (Publisher)event.getBlock();
}
if( m_publications.containsKey( event.getName() ) )
1.3 +1 -301 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/AbstractPublisher.java
Index: AbstractPublisher.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/AbstractPublisher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractPublisher.java 1 Jan 2003 19:24:25 -0000 1.2
+++ AbstractPublisher.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -1,301 +1 @@
-/*
- * 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.blocks.publishing;
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.StringTokenizer;
-import java.util.Vector;
-import org.apache.avalon.framework.activity.Initializable;
-import org.apache.avalon.framework.activity.Startable;
-import org.apache.avalon.framework.configuration.Configurable;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
-import org.apache.avalon.framework.context.Context;
-import org.apache.avalon.framework.context.Contextualizable;
-import org.apache.avalon.framework.logger.AbstractLogEnabled;
-import org.apache.avalon.framework.service.ServiceException;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.Serviceable;
-import org.apache.excalibur.altrmi.common.MethodRequest;
-import org.apache.excalibur.altrmi.server.AltrmiAuthenticator;
-import org.apache.excalibur.altrmi.server.AltrmiPublisher;
-import org.apache.excalibur.altrmi.server.ClassRetriever;
-import org.apache.excalibur.altrmi.server.MethodInvocationHandler;
-import org.apache.excalibur.altrmi.server.PublicationDescription;
-import org.apache.excalibur.altrmi.server.PublicationException;
-import org.apache.excalibur.altrmi.server.impl.AbstractServer;
-import org.apache.excalibur.altrmi.server.impl.classretrievers.AbstractDynamicGeneratorClassRetriever;
-import org.apache.excalibur.altrmi.server.impl.classretrievers.BcelDynamicGeneratorClassRetriever;
-import org.apache.excalibur.altrmi.server.impl.classretrievers.JarFileClassRetriever;
-import org.apache.excalibur.altrmi.server.impl.classretrievers.NoClassRetriever;
-import org.apache.avalon.framework.context.ContextException;
-
-/**
- * Abstract Publisher.
- *
- * @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
- * @author Thomas Kiesgen
- * @version $Revision$
- */
-public abstract class AbstractPublisher
- extends AbstractLogEnabled
- implements AltrmiPublisher, Startable, Serviceable, Contextualizable, Configurable,
- Initializable
-{
- private AbstractServer m_abstractServer;
- private ClassRetriever m_classRetriever;
- private AltrmiAuthenticator m_altrmiAuthenticator;
- protected File m_baseDirectory;
- private boolean m_isDynamicPublisher = false;
-
- /**
- *
- * @param configuration
- * @throws ConfigurationException
- */
- public void configure( Configuration configuration )
- throws ConfigurationException
- {
- String classRetrieverType = configuration.getChild( "classRetrieverType" ).getValue();
-
- if( classRetrieverType.equals( "jarFile" ) )
- {
- StringTokenizer st =
- new StringTokenizer( configuration.getChild( "generatedClassJarURLs" ).getValue(),
- "," );
- Vector vector = new Vector();
-
- while( st.hasMoreTokens() )
- {
- try
- {
- String url = st.nextToken();
-
- if( url.startsWith( "./" ) )
- {
- File file = new File( m_baseDirectory, url.substring( 2, url.length() ) );
-
- vector.add( file.toURL() );
- }
- else
- {
- vector.add( new URL( url ) );
- }
- }
- catch( MalformedURLException e )
- {
- getLogger()
- .debug( "Can't create URL from config element 'generatedClassJarURLs'",
- e );
- }
- }
-
- URL[] urls = new URL[ vector.size() ];
-
- vector.copyInto( urls );
-
- m_classRetriever = new JarFileClassRetriever( urls );
- }
- else if( classRetrieverType.equals( "none" ) )
- {
- m_classRetriever = new NoClassRetriever();
- }
- else if( classRetrieverType.equals( "bcel" ) )
- {
- AbstractDynamicGeneratorClassRetriever generator = new BcelDynamicGeneratorClassRetriever();
- File classGenDir = new File( m_baseDirectory, configuration.getChild( "classGenDir" ).getValue( "" ) );
- generator.setClassGenDir( classGenDir.getAbsolutePath() );
- m_classRetriever = generator;
-
- m_isDynamicPublisher = true;
- getLogger().debug( "setting classgen dir for generator to " + classGenDir.getAbsolutePath() );
- getLogger().debug( "setting class retriever to bcel dynamic generator" );
- }
-
-
- else
- {
- throw new ConfigurationException(
- "classRetrieverType must be 'bcel', 'jarFile' or 'none'" );
- }
- }
-
- /**
- * contextualize as per Contextualizable interface
- * @param context
- */
- public void contextualize( final Context context ) throws ContextException
- {
- m_baseDirectory = ( File ) context.get("app.home");
- }
-
- /**
- * Service as per Serviceable interface
- * @param manager a service manager
- * @throws ServiceException if a problem during servicing
- * @phoenix:dependency name="org.apache.excalibur.altrmi.server.AltrmiAuthenticator"
- */
- public void service( ServiceManager manager )
- throws ServiceException
- {
- m_altrmiAuthenticator =
- (AltrmiAuthenticator)manager.lookup( AltrmiAuthenticator.class.getName() );
- }
-
- /**
- * initialize as per Initializable interface
- * @throws Exception
- */
- public void initialize() throws Exception
- {
- m_abstractServer.setClassRetriever( m_classRetriever );
- m_abstractServer.setAuthenticator( m_altrmiAuthenticator );
- }
-
- /**
- *
- * @param implementation
- * @param asName
- * @param interfaceToExpose
- * @throws PublicationException
- */
- public void publish( Object implementation, String asName, Class interfaceToExpose )
- throws PublicationException
- {
- if( getLogger().isDebugEnabled() )
- getLogger().debug( "Publishing object [as: " + asName + ", impl: " + implementation
- + ", interf: "+ interfaceToExpose + "]" );
-
- if( m_isDynamicPublisher )
- {
- ( ( AbstractDynamicGeneratorClassRetriever ) m_classRetriever ).generate( asName, interfaceToExpose, this.getClass().getClassLoader() );
- if( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "generated dynamic proxy for published interface " + asName );
- }
- }
-
- m_abstractServer.publish( implementation, asName, interfaceToExpose );
- }
-
- /**
- * Publish an service
- * @param implementation
- * @param asName
- * @param publicationDescription
- * @throws PublicationException
- */
- public void publish(
- Object implementation, String asName, PublicationDescription publicationDescription )
- throws PublicationException
- {
- if( getLogger().isDebugEnabled() )
- getLogger().debug( "Publishing object [as: " + asName + ", impl: " + implementation + "]" );
-
- if( m_isDynamicPublisher )
- {
- ( ( AbstractDynamicGeneratorClassRetriever ) m_classRetriever ).generate( asName, publicationDescription, this.getClass().getClassLoader() );
- if( getLogger().isDebugEnabled() )
- {
- getLogger().debug( "generated dynamic proxy for published interface " + asName );
- }
- }
-
-
-
- m_abstractServer.publish( implementation, asName, publicationDescription );
- }
-
- /**
- *
- * @param object
- * @param asName
- * @throws PublicationException
- */
- public void unPublish( Object object, String asName ) throws PublicationException
- {
- if( getLogger().isDebugEnabled() )
- getLogger().debug( "Unpublishing object [nane: " + asName + ", impl: " + object + "]" );
-
- m_abstractServer.unPublish( object, asName );
- }
-
- /**
- *
- * @param object
- * @param asName
- * @param o1
- * @throws PublicationException
- */
- public void replacePublished( Object object, String asName, Object o1 ) throws PublicationException
- {
- if( getLogger().isDebugEnabled() )
- getLogger().debug( "Replacing published object [nane: " + asName + ", existing: " + object + ", new: " + o1 + "]" );
-
- m_abstractServer.replacePublished( object, asName, o1 );
- }
-
- /**
- *
- * @throws Exception
- */
- public void start() throws Exception
- {
- m_abstractServer.start();
- }
-
- /**
- *
- * @throws Exception
- */
- public void stop() throws Exception
- {
- m_abstractServer.stop();
- }
-
- /**
- *
- * @param request
- * @param publishedName
- * @return
- */
- public MethodInvocationHandler getMethodInvocationHandler( MethodRequest request, String publishedName )
- {
- return m_abstractServer.getMethodInvocationHandler( request, publishedName );
- }
-
- /**
- *
- * @param publishedName
- * @return
- */
- public MethodInvocationHandler getMethodInvocationHandler(String publishedName)
- {
- return m_abstractServer.getMethodInvocationHandler( publishedName );
- }
-
- /**
- *
- * @return
- */
- protected AbstractServer getAbstractServer()
- {
- return m_abstractServer;
- }
-
- /**
- *
- * @param abstractServer
- */
- protected void setAbstractServer( AbstractServer abstractServer )
- {
- m_abstractServer = abstractServer;
- }
-}
+/*
* 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.blocks.publishing;
import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.StringTokenizer;
import java.util.Vector;
import org.apache.avalon.framework.activity.Initializable;
import org.apache.avalon.framework.activity.Startable;
import org.apache.avalon.framework.configuration.Configurable;
import org.apache.avalon.framework.configuration.Configuration;
import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.Contextualizable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.excalibur.altrmi.common.MethodRequest;
import org.apache.excalibur.altrmi.server.Authenticator;
import org.apache.excalibur.altrmi.server.Publisher;
import org.apache.excalibur.altrmi.server.ClassRetriever;
import org.apache.excalibur.altrmi.server.MethodInvocationHandler;
import org.apache.excalibur.altrmi.server.PublicationDescription;
import org.apache.excalibur.altrmi.server.PublicationException;
import org.apache.excalibur.altrmi.server.impl.AbstractServer;
import org.apache.excalibur.altrmi.server.impl.classretrievers.AbstractDynamicGeneratorClassRetriever;
import org.apache.excalibur.altrmi.server.impl.classretrievers.BcelDynamicGeneratorClassRetriever;
import org.apache.excalibur.altrmi.server.impl.classretrievers.JarFileClassRetriever;
import org.apache.excalibur.altrmi.server.impl.classretrievers.NoClassRetriever;
import org.apache.avalon.framework.context.ContextException;
/**
* Abstract Publisher.
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @author Thomas Kiesgen
* @version $Revision$
*/
public abstract class AbstractPublisher
extends AbstractLogEnabled
implements Publisher, Startable, Serviceable, Contextualizable, Configurable,
Initializable
{
private AbstractServer m_abstractServer;
private ClassRetriever m_classRetriever;
private Authenticator m_altrmiAuthenticator;
protected File m_baseDirectory;
private boolean m_isDynamicPublisher = false;
/**
*
* @param configuration
* @throws ConfigurationException
*/
public void configure( Configuration configuration )
throws ConfigurationException
{
String classRetrieverType = configuration.getChild( "classRetrieverType" ).getValue();
if( classRetrieverType.equals( "jarFile" ) )
{
StringTokenizer st =
new StringTokenizer( configuration.getChild( "generatedClassJarURLs" ).getValue(),
"," );
Vector vector = new Vector();
while( st.hasMoreTokens() )
{
try
{
String url = st.nextToken();
if( url.startsWith( "./" ) )
{
File file = new File( m_baseDirectory, url.substring( 2, url.length() ) );
vector.add( file.toURL() );
}
else
{
vector.add( new URL( url ) );
}
}
catch( MalformedURLException e )
{
getLogger()
.debug( "Can't create URL from config element 'generatedClassJarURLs'",
e );
}
}
URL[] urls = new URL[ vector.size() ];
vector.copyInto( urls );
m_classRetriever = new JarFileClassRetriever( urls );
}
else if( classRetrieverType.equals( "none" ) )
{
m_classRetriever = new NoClassRetriever();
}
else if( classRetrieverType.equals( "bcel" ) )
{
AbstractDynamicGeneratorClassRetriever generator = new BcelDynamicGeneratorClassRetriever();
File classGenDir = new File( m_baseDirectory, configuration.getChild( "classGenDir" ).getValue( "" ) );
generator.setClassGenDir( classGenDir.getAbsolutePath() );
m_classRetriever = generator;
m_isDynamicPublisher = true;
getLogger().debug( "setting classgen dir for generator to " + classGenDir.getAbsolutePath() );
getLogger().debug( "setting class retriever to bcel dynamic generator" );
}
else
{
throw new ConfigurationException(
"classRetrieverType must be 'bcel', 'jarFile' or 'none'" );
}
}
/**
* contextualize as per Contextualizable interface
* @param context
*/
public void contextualize( final Context context ) throws ContextException
{
m_baseDirectory = ( File ) context.get("app.home");
}
/**
* Service as per Serviceable interface
* @param manager a service manager
* @throws ServiceException if a problem during servicing
* @phoenix:dependency name="org.apache.excalibur.altrmi.server.Authenticator"
*/
public void service( ServiceManager manager )
throws ServiceException
{
m_altrmiAuthenticator =
(Authenticator)manager.lookup( Authenticator.class.getName() );
}
/**
* initialize as per Initializable interface
* @throws Exception
*/
public void initialize() throws Exception
{
m_abstractServer.setClassRetriever( m_classRetriever );
m_abstractServer.setAuthenticator( m_altrmiAuthenticator );
}
/**
*
* @param implementation
* @param asName
* @param interfaceToExpose
* @throws PublicationException
*/
public void publish( Object implementation, String asName, Class interfaceToExpose )
throws PublicationException
{
if( getLogger().isDebugEnabled() )
getLogger().debug( "Publishing object [as: " + asName + ", impl: " + implementation
+ ", interf: "+ interfaceToExpose + "]" );
if( m_isDynamicPublisher )
{
( ( AbstractDynamicGeneratorClassRetriever ) m_classRetriever ).generate( asName, interfaceToExpose, this.getClass().getClassLoader() );
if( getLogger().isDebugEnabled() )
{
getLogger().debug( "generated dynamic proxy for published interface " + asName );
}
}
m_abstractServer.publish( implementation, asName, interfaceToExpose );
}
/**
* Publish an service
* @param implementation
* @param asName
* @param publicationDescription
* @throws PublicationException
*/
public void publish(
Object implementation, String asName, PublicationDescription publicationDescription )
throws PublicationException
{
if( getLogger().isDebugEnabled() )
getLogger().debug( "Publishing object [as: " + asName + ", impl: " + implementation + "]" );
if( m_isDynamicPublisher )
{
( ( AbstractDynamicGeneratorClassRetriever ) m_classRetriever ).generate( asName, publicationDescription, this.getClass().getClassLoader() );
if( getLogger().isDebugEnabled() )
{
getLogger().debug( "generated dynamic proxy for published interface " + asName );
}
}
m_abstractServer.publish( implementation, asName, publicationDescription );
}
/**
*
* @param object
* @param asName
* @throws PublicationException
*/
public void unPublish( Object object, String asName ) throws PublicationException
{
if( getLogger().isDebugEnabled() )
getLogger().debug( "Unpublishing object [nane: " + asName + ", impl: " + object + "]" );
m_abstractServer.unPublish( object, asName );
}
/**
*
* @param object
* @param asName
* @param o1
* @throws PublicationException
*/
public void replacePublished( Object object, String asName, Object o1 ) throws PublicationException
{
if( getLogger().isDebugEnabled() )
getLogger().debug( "Replacing published object [nane: " + asName + ", existing: " + object + ", new: " + o1 + "]" );
m_abstractServer.replacePublished( object, asName, o1 );
}
/**
*
* @throws Exception
*/
public void start() throws Exception
{
m_abstractServer.start();
}
/**
*
* @throws Exception
*/
public void stop() throws Exception
{
m_abstractServer.stop();
}
/**
*
* @param request
* @param publishedName
* @return
*/
public MethodInvocationHandler getMethodInvocationHandler( MethodRequest request, String publishedName )
{
return m_abstractServer.getMethodInvocationHandler( request, publishedName );
}
/**
*
* @param publishedName
* @return
*/
public MethodInvocationHandler getMethodInvocationHandler(String publishedName)
{
return m_abstractServer.getMethodInvocationHandler( publishedName );
}
/**
*
* @return
*/
protected AbstractServer getAbstractServer()
{
return m_abstractServer;
}
/**
*
* @param abstractServer
*/
protected void setAbstractServer( AbstractServer abstractServer )
{
m_abstractServer = abstractServer;
}
}
\ No newline at end of file
1.2 +2 -2 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/RmiPublisher.java
Index: RmiPublisher.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/RmiPublisher.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RmiPublisher.java 27 Dec 2002 00:07:28 -0000 1.1
+++ RmiPublisher.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -15,7 +15,7 @@
/**
* @phoenix:block
- * @phoenix:service name="org.apache.excalibur.altrmi.server.AltrmiPublisher"
+ * @phoenix:service name="org.apache.excalibur.altrmi.server.Publisher"
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision$
1.3 +2 -2 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/SocketStreamPublisher.java
Index: SocketStreamPublisher.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/publishing/SocketStreamPublisher.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SocketStreamPublisher.java 3 Jan 2003 00:17:16 -0000 1.2
+++ SocketStreamPublisher.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -26,7 +26,7 @@
/**
* @phoenix:block
- * @phoenix:service name="org.apache.excalibur.altrmi.server.AltrmiPublisher"
+ * @phoenix:service name="org.apache.excalibur.altrmi.server.Publisher"
*
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @author Mike Miller.
1.3 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/subscription/AbstractSubscriber.java
Index: AbstractSubscriber.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/blocks/subscription/AbstractSubscriber.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- AbstractSubscriber.java 5 Jan 2003 23:11:25 -0000 1.2
+++ AbstractSubscriber.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -17,8 +17,8 @@
import org.apache.excalibur.altrmi.client.InterfaceLookup;
import org.apache.excalibur.altrmi.client.impl.ClientClassAltrmiFactory;
import org.apache.excalibur.altrmi.client.impl.ServerClassAltrmiFactory;
-import org.apache.excalibur.altrmi.common.AltrmiAuthentication;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.Authentication;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* @phoenix:service name="org.apache.excalibur.altrmi.client.InterfaceLookup"
@@ -59,13 +59,13 @@
}
}
- public Object lookup( String publishedName ) throws AltrmiConnectionException
+ public Object lookup( String publishedName ) throws ConnectionException
{
return m_altrmiFactory.lookup( publishedName );
}
- public Object lookup( String publishedName, AltrmiAuthentication authentication )
- throws AltrmiConnectionException
+ public Object lookup( String publishedName, Authentication authentication )
+ throws ConnectionException
{
return m_altrmiFactory.lookup( publishedName, authentication );
}
1.2 +2 -2 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/AbstractSubscriber.java
Index: AbstractSubscriber.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/AbstractSubscriber.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AbstractSubscriber.java 8 Aug 2002 14:18:39 -0000 1.1
+++ AbstractSubscriber.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -14,7 +14,7 @@
* developers should create a subclass of this interface and provide a method such as
*
* <pre>
- * YourRemoteInterface select( AltrmiAuthentication authentication );
+ * YourRemoteInterface select( Authentication authentication );
* </pre>
*
* Your subclassed interface can then be used in your application so application components
1.6 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/AltrmiFactory.java
Index: AltrmiFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/AltrmiFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AltrmiFactory.java 5 Jan 2003 23:11:25 -0000 1.5
+++ AltrmiFactory.java 5 Jan 2003 23:24:08 -0000 1.6
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.altrmi.client;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.io.IOException;
@@ -24,17 +24,17 @@
/**
* Set the HostContext
* @param hostContext the host context
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*
*/
- void setHostContext( HostContext hostContext ) throws AltrmiConnectionException;
+ void setHostContext( HostContext hostContext ) throws ConnectionException;
/**
* Set the host context
* @param hostContext the host context
* @param allowOptimize allow optimize
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
- void setHostContext( HostContext hostContext, boolean allowOptimize ) throws AltrmiConnectionException;
+ void setHostContext( HostContext hostContext, boolean allowOptimize ) throws ConnectionException;
}
1.3 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/CallbackEnabledClientInvocationHandler.java
Index: CallbackEnabledClientInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/CallbackEnabledClientInvocationHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CallbackEnabledClientInvocationHandler.java 5 Jan 2003 23:11:25 -0000 1.2
+++ CallbackEnabledClientInvocationHandler.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -8,7 +8,7 @@
package org.apache.excalibur.altrmi.client;
-import org.apache.excalibur.altrmi.common.AltrmiCallbackException;
+import org.apache.excalibur.altrmi.common.CallbackException;
/**
* Interface CallbackEnabledClientInvocationHandler
@@ -20,6 +20,6 @@
public interface CallbackEnabledClientInvocationHandler {
- boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws AltrmiCallbackException;
+ boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws CallbackException;
String getPublishedName( Object tobeExposedObject );
}
1.2 +7 -7 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ClientInvocationHandler.java
Index: ClientInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ClientInvocationHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ClientInvocationHandler.java 5 Jan 2003 23:11:40 -0000 1.1
+++ ClientInvocationHandler.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client;
import java.io.IOException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.InvocationHandler;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Interface ClientInvocationHandler
@@ -18,7 +18,7 @@
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version * $Revision$
*/
-public interface ClientInvocationHandler extends AltrmiInvocationHandler
+public interface ClientInvocationHandler extends InvocationHandler
{
/**
@@ -43,10 +43,10 @@
* Method initialize
*
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- void initialize() throws AltrmiConnectionException;
+ void initialize() throws ConnectionException;
/**
* Method close
@@ -79,7 +79,7 @@
*
*/
ClassLoader getInterfacesClassLoader();
-
+
/**
* morphObject handles any changes to the arguments being
* marshalled to the server.
1.2 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ConnectionListener.java
Index: ConnectionListener.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/ConnectionListener.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ConnectionListener.java 5 Jan 2003 23:11:40 -0000 1.1
+++ ConnectionListener.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.altrmi.client;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.Request;
import java.io.IOException;
@@ -51,7 +51,7 @@
* @param suggestedWaitMillis
*
*/
- void serviceSuspended( AltrmiRequest altrmiRequest, int attempt, int suggestedWaitMillis );
+ void serviceSuspended( Request altrmiRequest, int attempt, int suggestedWaitMillis );
/**
* Method serviceAbend
1.2 +12 -12 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/InterfaceLookup.java
Index: InterfaceLookup.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/InterfaceLookup.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InterfaceLookup.java 5 Jan 2003 23:11:40 -0000 1.1
+++ InterfaceLookup.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -7,13 +7,13 @@
*/
package org.apache.excalibur.altrmi.client;
-import org.apache.excalibur.altrmi.common.AltrmiAuthentication;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.Authentication;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* InterfaceLookup describes the initial client's interaction with
* with the server (lookup/listing of remote services.)
- *
+ *
* @author Paul Hammant <a href="mailto:Paul_Hammant@yahoo.com">Paul_Hammant@yahoo.com</a>
* @version $Revision$
*/
@@ -21,7 +21,7 @@
{
/**
- * Lookup a name by which the remote service is
+ * Lookup a name by which the remote service is
* published by the server.
* Usage:
* <code>
@@ -30,26 +30,26 @@
* </code>
* @param publishedServiceName
* @return proxy to the Remote service.
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*/
Object lookup(String publishedServiceName)
- throws AltrmiConnectionException;
+ throws ConnectionException;
/**
- * Lookup a name by which the remote service is
- * published by the server within the context of
+ * Lookup a name by which the remote service is
+ * published by the server within the context of
* the Authentication credentials supplied.
*
* @param publishedServiceName
* @param altrmiAuthentication
* @return
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
Object lookup(
String publishedServiceName,
- AltrmiAuthentication altrmiAuthentication)
- throws AltrmiConnectionException;
+ Authentication altrmiAuthentication)
+ throws ConnectionException;
/**
* This method returns the list of names of the
1.2 +5 -5 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/InterfaceLookupFactory.java
Index: InterfaceLookupFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/InterfaceLookupFactory.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- InterfaceLookupFactory.java 5 Jan 2003 23:11:40 -0000 1.1
+++ InterfaceLookupFactory.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -7,7 +7,7 @@
*/
package org.apache.excalibur.altrmi.client;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Interface InterfaceLookupFactory
@@ -41,7 +41,7 @@
*
*/
InterfaceLookup getAltrmiInterfaceLookup( String factoryString, boolean optimize )
- throws AltrmiConnectionException;
+ throws ConnectionException;
/**
* Method getAltrmiInterfaceLookup
@@ -53,10 +53,10 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
InterfaceLookup getAltrmiInterfaceLookup(
String factoryString, ClassLoader interfacesClassLoader, boolean optimize
- ) throws AltrmiConnectionException;
+ ) throws ConnectionException;
}
1.16 +28 -28 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractAltrmiFactory.java
Index: AbstractAltrmiFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractAltrmiFactory.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AbstractAltrmiFactory.java 5 Jan 2003 23:11:25 -0000 1.15
+++ AbstractAltrmiFactory.java 5 Jan 2003 23:24:08 -0000 1.16
@@ -19,12 +19,12 @@
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.common.OpenConnectionRequest;
import org.apache.excalibur.altrmi.common.SameVMReply;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
+import org.apache.excalibur.altrmi.common.Reply;
import org.apache.excalibur.altrmi.common.NotPublishedReply;
-import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
+import org.apache.excalibur.altrmi.common.ReplyConstants;
import org.apache.excalibur.altrmi.common.LookupRequest;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiAuthentication;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.Authentication;
import org.apache.excalibur.altrmi.common.ExceptionReply;
import org.apache.excalibur.altrmi.common.LookupReply;
import org.apache.excalibur.altrmi.common.ListReply;
@@ -79,9 +79,9 @@
/**
* Set the HostContext (defauts to optimize = true)
* @param hostContext the host context
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
- public void setHostContext(HostContext hostContext) throws AltrmiConnectionException {
+ public void setHostContext(HostContext hostContext) throws ConnectionException {
setHostContext(hostContext, true);
}
@@ -89,9 +89,9 @@
* Set the host context
* @param hostContext the host context
* @param allowOptimize allow optimization
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
- public void setHostContext( HostContext hostContext, boolean allowOptimize ) throws AltrmiConnectionException
+ public void setHostContext( HostContext hostContext, boolean allowOptimize ) throws ConnectionException
{
if( m_hostContext == null )
{
@@ -108,7 +108,7 @@
machineID = null;
}
- AltrmiReply reply =
+ Reply reply =
m_clientInvocationHandler.handleInvocation(new OpenConnectionRequest( machineID ) );
if( reply instanceof SameVMReply )
@@ -134,7 +134,7 @@
}
else
{
- throw new AltrmiConnectionException("SameVM instruction for non rebindable host context.");
+ throw new ConnectionException("SameVM instruction for non rebindable host context.");
}
}
@@ -147,7 +147,7 @@
else
{
- throw new AltrmiConnectionException("Setting of host context blocked for reasons of unknown, server-side reply: (" +
+ throw new ConnectionException("Setting of host context blocked for reasons of unknown, server-side reply: (" +
reply.getClass().getName() + ")");
}
}
@@ -161,33 +161,33 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public Object lookup( String publishedServiceName, AltrmiAuthentication altrmiAuthentication )
- throws AltrmiConnectionException
+ public Object lookup( String publishedServiceName, Authentication altrmiAuthentication )
+ throws ConnectionException
{
- AltrmiReply ar =
+ Reply ar =
m_clientInvocationHandler.handleInvocation( new LookupRequest( publishedServiceName, altrmiAuthentication,
m_session ) );
- if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
+ if( ar.getReplyCode() >= ReplyConstants.PROBLEMREPLY )
{
if( ar instanceof NotPublishedReply )
{
- throw new AltrmiConnectionException( "Service " + publishedServiceName
+ throw new ConnectionException( "Service " + publishedServiceName
+ " not published" );
}
else if( ar instanceof ExceptionReply )
{
ExceptionReply er = (ExceptionReply)ar;
- throw (AltrmiConnectionException)er.getReplyException();
+ throw (ConnectionException)er.getReplyException();
}
else
{
- throw new AltrmiConnectionException( "Problem doing lookup on service" );
+ throw new ConnectionException( "Problem doing lookup on service" );
}
}
else if( ar instanceof ExceptionReply )
@@ -195,9 +195,9 @@
ExceptionReply er = (ExceptionReply)ar;
Throwable t = er.getReplyException();
- if( t instanceof AltrmiConnectionException )
+ if( t instanceof ConnectionException )
{
- throw (AltrmiConnectionException)t;
+ throw (ConnectionException)t;
}
else if( t instanceof Error )
{
@@ -209,7 +209,7 @@
}
else
{
- throw new AltrmiConnectionException( "Problem doing lookup on service [exception: "
+ throw new ConnectionException( "Problem doing lookup on service [exception: "
+ t.getMessage() + "]" );
}
}
@@ -233,11 +233,11 @@
protected abstract Class getFacadeClass(
String publishedServiceName, String objectName, boolean beanOnly )
- throws AltrmiConnectionException, ClassNotFoundException;
+ throws ConnectionException, ClassNotFoundException;
protected abstract Object getInstance(
String publishedServiceName, String objectName, DefaultProxyHelper proxyHelper,
- boolean beanOnly ) throws AltrmiConnectionException;
+ boolean beanOnly ) throws ConnectionException;
/**
* Method registerReferenceObject
@@ -317,10 +317,10 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public final Object lookup( String publishedServiceName ) throws AltrmiConnectionException
+ public final Object lookup( String publishedServiceName ) throws ConnectionException
{
return lookup( publishedServiceName, null );
}
@@ -343,7 +343,7 @@
public String[] list()
{
- AltrmiReply ar = m_clientInvocationHandler.handleInvocation( new ListRequest() );
+ Reply ar = m_clientInvocationHandler.handleInvocation( new ListRequest() );
if( ar instanceof ListReply )
{
1.9 +7 -7 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractClientInvocationHandler.java
Index: AbstractClientInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractClientInvocationHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AbstractClientInvocationHandler.java 5 Jan 2003 23:11:25 -0000 1.8
+++ AbstractClientInvocationHandler.java 5 Jan 2003 23:24:08 -0000 1.9
@@ -14,11 +14,11 @@
import org.apache.excalibur.altrmi.client.ConnectionPinger;
import org.apache.excalibur.altrmi.client.AltrmiProxy;
import org.apache.excalibur.altrmi.client.ConnectionClosedException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
+import org.apache.excalibur.altrmi.common.InvocationHandler;
+import org.apache.excalibur.altrmi.common.Reply;
import org.apache.excalibur.altrmi.common.FacadeRefHolder;
import org.apache.excalibur.altrmi.common.PingRequest;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class AbstractClientInvocationHandler
@@ -52,10 +52,10 @@
* Method initialize
*
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public void initialize() throws AltrmiConnectionException
+ public void initialize() throws ConnectionException
{
if( m_connectionPinger == null )
@@ -93,7 +93,7 @@
throw new ConnectionClosedException( "Connection closed" );
}
- AltrmiReply ar = handleInvocation( new PingRequest() );
+ Reply ar = handleInvocation( new PingRequest() );
}
protected abstract boolean tryReconnect();
1.11 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractConnectionPinger.java
Index: AbstractConnectionPinger.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractConnectionPinger.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AbstractConnectionPinger.java 5 Jan 2003 23:11:25 -0000 1.10
+++ AbstractConnectionPinger.java 5 Jan 2003 23:24:08 -0000 1.11
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.client.ConnectionPinger;
import org.apache.excalibur.altrmi.client.ConnectionClosedException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
+import org.apache.excalibur.altrmi.common.InvocationException;
/**
* Interface AbstractConnectionPinger
@@ -109,7 +109,7 @@
ping();
}
}
- catch( AltrmiInvocationException ie )
+ catch( InvocationException ie )
{
// We really need a logger or something to be able to see this
1.6 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractFactoryHelper.java
Index: AbstractFactoryHelper.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractFactoryHelper.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractFactoryHelper.java 5 Jan 2003 23:11:25 -0000 1.5
+++ AbstractFactoryHelper.java 5 Jan 2003 23:24:08 -0000 1.6
@@ -12,7 +12,7 @@
import org.apache.excalibur.altrmi.client.AltrmiFactory;
import org.apache.excalibur.altrmi.client.InterfaceLookup;
import org.apache.excalibur.altrmi.client.InterfaceLookupFactory;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class AbstractFactoryHelper
@@ -68,11 +68,11 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public final InterfaceLookup getAltrmiInterfaceLookup( String factoryString, boolean optimize )
- throws AltrmiConnectionException
+ throws ConnectionException
{
return getAltrmiInterfaceLookup( factoryString, this.getClass().getClassLoader(), optimize );
}
1.7 +7 -7 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractInterfaceLookupFactory.java
Index: AbstractInterfaceLookupFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractInterfaceLookupFactory.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractInterfaceLookupFactory.java 5 Jan 2003 23:11:25 -0000 1.6
+++ AbstractInterfaceLookupFactory.java 5 Jan 2003 23:24:08 -0000 1.7
@@ -10,7 +10,7 @@
import java.util.Vector;
import org.apache.excalibur.altrmi.client.InterfaceLookup;
import org.apache.excalibur.altrmi.client.InterfaceLookupFactory;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class AbstractInterfaceLookupFactory
@@ -37,11 +37,11 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public final InterfaceLookup getAltrmiInterfaceLookup( String factoryString, boolean optimize )
- throws AltrmiConnectionException
+ throws ConnectionException
{
return getAltrmiInterfaceLookup( factoryString, this.getClass().getClassLoader(), optimize );
}
@@ -55,12 +55,12 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public InterfaceLookup getAltrmiInterfaceLookup(
String factoryString, ClassLoader interfacesClassLoader, boolean optimize )
- throws AltrmiConnectionException
+ throws ConnectionException
{
for( int i = 0; i < m_factories.size(); i++ )
1.6 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractSameVmBindableHostContext.java
Index: AbstractSameVmBindableHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/AbstractSameVmBindableHostContext.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- AbstractSameVmBindableHostContext.java 5 Jan 2003 23:11:25 -0000 1.5
+++ AbstractSameVmBindableHostContext.java 5 Jan 2003 23:24:08 -0000 1.6
@@ -9,7 +9,7 @@
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import org.apache.excalibur.altrmi.common.RegistryHelper;
public abstract class AbstractSameVmBindableHostContext extends AbstractHostContext{
@@ -23,9 +23,9 @@
/**
* Make a HostContext for this using SameVM connections nstead of socket based ones.
* @return the HostContext
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
- public abstract AbstractHostContext makeSameVmHostContext() throws AltrmiConnectionException;
+ public abstract AbstractHostContext makeSameVmHostContext() throws ConnectionException;
protected Object getOptmization(String uniqueID)
{
1.10 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ClientClassAltrmiFactory.java
Index: ClientClassAltrmiFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ClientClassAltrmiFactory.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ClientClassAltrmiFactory.java 20 Oct 2002 19:19:51 -0000 1.9
+++ ClientClassAltrmiFactory.java 5 Jan 2003 23:24:08 -0000 1.10
@@ -9,7 +9,7 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class ClientClassAltrmiFactory
@@ -35,7 +35,7 @@
protected Class getFacadeClass(
String publishedServiceName, String objectName, boolean beanOnly )
- throws AltrmiConnectionException, ClassNotFoundException
+ throws ConnectionException, ClassNotFoundException
{
String code = "2";
@@ -63,12 +63,12 @@
*
* @return
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
protected Object getInstance(
String publishedServiceName, String objectName, DefaultProxyHelper proxyHelper, boolean beanOnly )
- throws AltrmiConnectionException
+ throws ConnectionException
{
try
@@ -81,22 +81,22 @@
}
catch( InvocationTargetException ite )
{
- throw new AltrmiConnectionException( "Generated class not instantiated : "
+ throw new ConnectionException( "Generated class not instantiated : "
+ ite.getTargetException().getMessage() );
}
catch( ClassNotFoundException cnfe )
{
- throw new AltrmiConnectionException( "Generated class not found during lookup : "
+ throw new ConnectionException( "Generated class not found during lookup : "
+ cnfe.getMessage() );
}
catch( InstantiationException ie )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Generated class not instantiable during lookup : " + ie.getMessage() );
}
catch( IllegalAccessException iae )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Illegal access to generated class during lookup : " + iae.getMessage() );
}
}
1.2 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ClientStreamReadWriter.java
Index: ClientStreamReadWriter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ClientStreamReadWriter.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ClientStreamReadWriter.java 13 Dec 2002 00:09:14 -0000 1.1
+++ ClientStreamReadWriter.java 5 Jan 2003 23:24:08 -0000 1.2
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client.impl;
import java.io.IOException;
-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;
/**
* Class ClientStreamReadWriter
@@ -20,5 +20,5 @@
*/
public interface ClientStreamReadWriter
{
- AltrmiReply postRequest( AltrmiRequest altrmiRequest ) throws IOException, ClassNotFoundException;
+ Reply postRequest( Request altrmiRequest ) throws IOException, ClassNotFoundException;
}
1.8 +8 -8 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultConnectionListener.java
Index: DefaultConnectionListener.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultConnectionListener.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DefaultConnectionListener.java 5 Jan 2003 23:11:25 -0000 1.7
+++ DefaultConnectionListener.java 5 Jan 2003 23:24:08 -0000 1.8
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client.impl;
import org.apache.excalibur.altrmi.client.ConnectionListener;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.InvocationException;
+import org.apache.excalibur.altrmi.common.Request;
import java.io.IOException;
@@ -23,7 +23,7 @@
public class DefaultConnectionListener implements ConnectionListener
{
private int m_maxReconnectAttempts;
-
+
/**
* Creates a new DefaultConnectionListener.
*/
@@ -31,7 +31,7 @@
{
this( 3 ); // Default to 3 reconnect attempts.
}
-
+
/**
* Creates a new DefaultConnectionListener.
*
@@ -83,14 +83,14 @@
* @param suggestedWaitMillis
*
*/
- public void serviceSuspended( final AltrmiRequest altrmiRequest, final int attempt,
+ public void serviceSuspended( final Request altrmiRequest, final int attempt,
final int suggestedWaitMillis )
{
// Lets say that ten retries is too many.
if( attempt == 10 )
{
- throw new AltrmiInvocationException( "Too many retries on suspended service" );
+ throw new InvocationException( "Too many retries on suspended service" );
}
System.out.println( "AltRMI service suspended, Trying to reconnect (attempt " + attempt
@@ -148,7 +148,7 @@
msg = msg + "Unknown cause of abend.";
}
}
- throw new AltrmiInvocationException( msg );
+ throw new InvocationException( msg );
}
System.out.println( "AltRMI service abnormally ended, Trying to reconnect (attempt "
1.18 +17 -17 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultProxyHelper.java
Index: DefaultProxyHelper.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DefaultProxyHelper.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- DefaultProxyHelper.java 5 Jan 2003 23:11:25 -0000 1.17
+++ DefaultProxyHelper.java 5 Jan 2003 23:24:08 -0000 1.18
@@ -10,9 +10,9 @@
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.client.AltrmiProxy;
import org.apache.excalibur.altrmi.client.ProxyHelper;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
+import org.apache.excalibur.altrmi.common.InvocationException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.ReplyConstants;
import org.apache.excalibur.altrmi.common.ExceptionReply;
import org.apache.excalibur.altrmi.common.GarbageCollectionReply;
import org.apache.excalibur.altrmi.common.GarbageCollectionRequest;
@@ -122,9 +122,9 @@
m_session );
}
- AltrmiReply reply = m_clientInvocationHandler.handleInvocation( request );
+ Reply reply = m_clientInvocationHandler.handleInvocation( request );
- if( reply.getReplyCode() == AltrmiReplyConstants.METHODFACADEREPLY )
+ if( reply.getReplyCode() == ReplyConstants.METHODFACADEREPLY )
{
MethodFacadeReply mfr = (MethodFacadeReply)reply;
Long ref = mfr.getReferenceID();
@@ -157,7 +157,7 @@
return implBean;
}
}
- else if( reply.getReplyCode() == AltrmiReplyConstants.METHODFACADEARRAYREPLY )
+ else if( reply.getReplyCode() == ReplyConstants.METHODFACADEARRAYREPLY )
{
MethodFacadeArrayReply mfar = (MethodFacadeArrayReply)reply;
Long[] refs = mfar.getReferenceIDs();
@@ -235,9 +235,9 @@
MethodRequest request = new MethodRequest( m_publishedServiceName, m_objectName,
methodSignature, args, m_referenceID, m_session );
- AltrmiReply reply = m_clientInvocationHandler.handleInvocation( request );
+ Reply reply = m_clientInvocationHandler.handleInvocation( request );
- if( reply.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
+ if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
{
MethodReply or = (MethodReply)reply;
@@ -258,9 +258,9 @@
rawRequests, m_referenceID, m_session );
//debug(args);
- AltrmiReply reply = m_clientInvocationHandler.handleInvocation( request );
+ Reply reply = m_clientInvocationHandler.handleInvocation( request );
- if( reply.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
+ if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
{
MethodReply or = (MethodReply)reply;
return;
@@ -288,9 +288,9 @@
methodSignature, args, m_referenceID, m_session );
//debug(args);
- AltrmiReply reply = m_clientInvocationHandler.handleInvocation( request );
+ Reply reply = m_clientInvocationHandler.handleInvocation( request );
- if( reply.getReplyCode() == AltrmiReplyConstants.METHODREPLY )
+ if( reply.getReplyCode() == ReplyConstants.METHODREPLY )
{
MethodReply or = (MethodReply)reply;
@@ -340,16 +340,16 @@
* @param reply The reply that represents the unexpected reply.
* @return The exception that is pertient.
*/
- private Throwable makeUnexpectedReplyThrowable(AltrmiReply reply) {
+ private Throwable makeUnexpectedReplyThrowable(Reply reply) {
- if( reply.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
+ if( reply.getReplyCode() == ReplyConstants.EXCEPTIONREPLY )
{
ExceptionReply er = (ExceptionReply)reply;
return er.getReplyException();
}
else
{
- return new AltrmiInvocationException( "Internal Error : Unknown reply type :"
+ return new InvocationException( "Internal Error : Unknown reply type :"
+ reply.getClass().getName() );
}
}
@@ -383,7 +383,7 @@
synchronized( m_altrmiFactory )
{
- AltrmiReply reply =
+ Reply reply =
m_clientInvocationHandler
.handleInvocation( new GarbageCollectionRequest( m_publishedServiceName,
m_objectName, m_session,
1.3 +5 -5 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DumbConnectionListener.java
Index: DumbConnectionListener.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DumbConnectionListener.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DumbConnectionListener.java 5 Jan 2003 23:11:25 -0000 1.2
+++ DumbConnectionListener.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client.impl;
import org.apache.excalibur.altrmi.client.ConnectionListener;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.InvocationException;
+import org.apache.excalibur.altrmi.common.Request;
import java.io.IOException;
@@ -66,7 +66,7 @@
* @param suggestedWaitMillis
*
*/
- public void serviceSuspended( final AltrmiRequest altrmiRequest, final int attempt,
+ public void serviceSuspended( final Request altrmiRequest, final int attempt,
final int suggestedWaitMillis )
{
}
@@ -81,6 +81,6 @@
*/
public void serviceAbend( int attempt, IOException cause )
{
- throw new AltrmiInvocationException( "AltRMI Service has Abended." );
+ throw new InvocationException( "AltRMI Service has Abended." );
}
}
1.4 +3 -3 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicClassAltrmiFactory.java
Index: DynamicClassAltrmiFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicClassAltrmiFactory.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DynamicClassAltrmiFactory.java 5 Jan 2003 23:11:25 -0000 1.3
+++ DynamicClassAltrmiFactory.java 5 Jan 2003 23:24:08 -0000 1.4
@@ -57,7 +57,7 @@
package org.apache.excalibur.altrmi.client.impl;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* DynamicClassAltrmiFactory creates stubs(@see DynamicStub) for the given
@@ -88,7 +88,7 @@
String publishedServiceName,
String objectName,
boolean beanOnly)
- throws AltrmiConnectionException, ClassNotFoundException
+ throws ConnectionException, ClassNotFoundException
{
//NOT USED
return null;
@@ -102,7 +102,7 @@
String objectName,
DefaultProxyHelper proxyHelper,
boolean beanOnly)
- throws AltrmiConnectionException
+ throws ConnectionException
{
return new DynamicStub(publishedServiceName,objectName,proxyHelper);
}
1.5 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicInvoker.java
Index: DynamicInvoker.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicInvoker.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DynamicInvoker.java 5 Jan 2003 23:11:25 -0000 1.4
+++ DynamicInvoker.java 5 Jan 2003 23:24:08 -0000 1.5
@@ -62,8 +62,8 @@
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.client.HostContext;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.Reply;
import org.apache.excalibur.altrmi.common.ListMethodsReply;
import org.apache.excalibur.altrmi.common.ListMethodsRequest;
@@ -148,7 +148,7 @@
public String[] listOfMethods(String publishedName)
{
- AltrmiReply ar =
+ Reply ar =
m_clientInvocationHandler.handleInvocation(
new ListMethodsRequest(publishedName));
@@ -175,14 +175,14 @@
* @param args arguments to the function
* @param argClasses corresponding classes of the arguments.
* @return Object the return value of the remote call
- * @throws AltrmiConnectionException If a problem
+ * @throws ConnectionException If a problem
*/
public Object invoke(
String publishedName,
String methodName,
Object[] args,
Class[] argClasses)
- throws AltrmiConnectionException
+ throws ConnectionException
{
//check the stub cache
DynamicStub stub = (DynamicStub) m_stubs.get(publishedName);
@@ -191,7 +191,7 @@
stub = (DynamicStub) m_factory.lookup(publishedName);
if (stub == null)
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
publishedName + " is NOT published on the server");
}
m_stubs.put(publishedName, stub);
1.3 +1 -1 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicStub.java
Index: DynamicStub.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/DynamicStub.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DynamicStub.java 5 Nov 2002 07:19:46 -0000 1.2
+++ DynamicStub.java 5 Jan 2003 23:24:08 -0000 1.3
@@ -136,7 +136,7 @@
{
t.printStackTrace();
throw new org.apache.excalibur.altrmi.common.
- AltrmiInvocationException(
+ InvocationException(
"Should never get here: " + t.getMessage());
}
}
1.12 +15 -15 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ServerClassAltrmiFactory.java
Index: ServerClassAltrmiFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/ServerClassAltrmiFactory.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ServerClassAltrmiFactory.java 4 Jan 2003 22:17:18 -0000 1.11
+++ ServerClassAltrmiFactory.java 5 Jan 2003 23:24:08 -0000 1.12
@@ -10,14 +10,14 @@
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.Reply;
import org.apache.excalibur.altrmi.common.ClassReply;
import org.apache.excalibur.altrmi.common.ClassRequest;
import org.apache.excalibur.altrmi.common.ClassRetrievalFailedReply;
import org.apache.excalibur.altrmi.common.NotPublishedException;
import org.apache.excalibur.altrmi.common.RequestFailedReply;
-import org.apache.excalibur.altrmi.common.AltrmiReplyConstants;
+import org.apache.excalibur.altrmi.common.ReplyConstants;
/**
* Class ServerClassAltrmiFactory
@@ -45,7 +45,7 @@
protected Class getFacadeClass(
String publishedServiceName, String objectName, boolean beanOnly )
- throws AltrmiConnectionException, ClassNotFoundException
+ throws ConnectionException, ClassNotFoundException
{
String code = "2";
@@ -70,22 +70,22 @@
try
{
- AltrmiReply ar =
+ Reply ar =
m_hostContext.getClientInvocationHandler()
.handleInvocation( new ClassRequest( publishedServiceName, objectName ) );
- if( ar.getReplyCode() >= AltrmiReplyConstants.PROBLEMREPLY )
+ if( ar.getReplyCode() >= ReplyConstants.PROBLEMREPLY )
{
if( ar instanceof RequestFailedReply )
{
- throw new AltrmiConnectionException( ( (RequestFailedReply)ar )
+ throw new ConnectionException( ( (RequestFailedReply)ar )
.getFailureReason() );
}
else if( ar instanceof ClassRetrievalFailedReply )
{
ClassRetrievalFailedReply crfr = (ClassRetrievalFailedReply)ar;
- throw new AltrmiConnectionException( "Class Retrieval Failed - "
+ throw new ConnectionException( "Class Retrieval Failed - "
+ crfr.getReason() );
} //TODO others.
}
@@ -94,7 +94,7 @@
}
catch( NotPublishedException npe )
{
- throw new AltrmiConnectionException( "Service " + publishedServiceName
+ throw new ConnectionException( "Service " + publishedServiceName
+ " not published on Server" );
}
@@ -126,7 +126,7 @@
protected Object getInstance(
String publishedServiceName, String objectName, DefaultProxyHelper proxyHelper, boolean beanOnly )
- throws AltrmiConnectionException
+ throws ConnectionException
{
String code = "2";
@@ -146,22 +146,22 @@
}
catch( InvocationTargetException ite )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Generated class not instantiated.", ite.getTargetException() );
}
catch( ClassNotFoundException cnfe )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Generated class not found during lookup.", cnfe );
}
catch( InstantiationException ie )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Generated class not instantiable during lookup.", ie );
}
catch( IllegalAccessException iae )
{
- throw new AltrmiConnectionException(
+ throw new ConnectionException(
"Illegal access to generated class during lookup.", iae );
}
}
1.4 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamHostContext.java
Index: CallbackEnabledSocketCustomStreamHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamHostContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- CallbackEnabledSocketCustomStreamHostContext.java 6 May 2002 18:14:36 -0000 1.3
+++ CallbackEnabledSocketCustomStreamHostContext.java 5 Jan 2003 23:24:09 -0000 1.4
@@ -9,8 +9,8 @@
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
import org.apache.excalibur.altrmi.client.impl.socket.SocketCustomStreamHostContext;
-import org.apache.excalibur.altrmi.common.AltrmiCallbackException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.CallbackException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class CallbackEnabledSocketCustomStreamHostContext
@@ -20,17 +20,17 @@
public class CallbackEnabledSocketCustomStreamHostContext extends AbstractHostContext
{
- public CallbackEnabledSocketCustomStreamHostContext( String host, int port ) throws AltrmiConnectionException
+ public CallbackEnabledSocketCustomStreamHostContext( String host, int port ) throws ConnectionException
{
super( new CallbackEnabledSocketCustomStreamInvocationHandler( host, port, SocketCustomStreamHostContext.class.getClassLoader() ) );
}
- public CallbackEnabledSocketCustomStreamHostContext( String host, int port, ClassLoader classLoader ) throws AltrmiConnectionException
+ public CallbackEnabledSocketCustomStreamHostContext( String host, int port, ClassLoader classLoader ) throws ConnectionException
{
super( new CallbackEnabledSocketCustomStreamInvocationHandler( host, port, classLoader ) );
}
- public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws AltrmiCallbackException
+ public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws CallbackException
{
return ( (CallbackEnabledSocketCustomStreamInvocationHandler)getClientInvocationHandler() ).exposeObject( tobeExposedObject, tobeExposedInterface );
}
1.13 +14 -14 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamInvocationHandler.java
Index: CallbackEnabledSocketCustomStreamInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/socket/CallbackEnabledSocketCustomStreamInvocationHandler.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- CallbackEnabledSocketCustomStreamInvocationHandler.java 5 Jan 2003 23:11:26 -0000 1.12
+++ CallbackEnabledSocketCustomStreamInvocationHandler.java 5 Jan 2003 23:24:09 -0000 1.13
@@ -15,8 +15,8 @@
import org.apache.excalibur.altrmi.client.impl.callback.stream.CallbackEnabledClientCustomStreamReadWriter;
import org.apache.excalibur.altrmi.client.impl.socket.AbstractSocketStreamInvocationHandler;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
-import org.apache.excalibur.altrmi.common.AltrmiCallbackException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.CallbackException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import org.apache.excalibur.altrmi.common.ExposedObjectProxy;
/**
@@ -35,7 +35,7 @@
* @see AbstractSocketStreamInvocationHandler#AbstractSocketStreamInvocationHandler(String, int, ClassLoader)
*/
public CallbackEnabledSocketCustomStreamInvocationHandler( String host, int port, ClassLoader classLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( host, port, classLoader );
}
@@ -44,7 +44,7 @@
* @see AbstractSocketStreamInvocationHandler#createClientStreamReadWriter(InputStream, OutputStream)
*/
protected ClientStreamReadWriter createClientStreamReadWriter(
- InputStream in, OutputStream out ) throws AltrmiConnectionException
+ InputStream in, OutputStream out ) throws ConnectionException
{
if( m_callbackEnabledClientCustomStreamReadWriter == null )
{
@@ -53,7 +53,7 @@
return m_callbackEnabledClientCustomStreamReadWriter;
}
- public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws AltrmiCallbackException
+ public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws CallbackException
{
return m_callbackEnabledClientCustomStreamReadWriter.exposeObject( tobeExposedObject, tobeExposedInterface );
}
@@ -63,14 +63,14 @@
return m_callbackEnabledClientCustomStreamReadWriter.getPublishedName( tobeExposedObject );
}
-
+
/**
* <pre>
- * <code>resolveArgument</code> override here handles the passage of references
+ * <code>resolveArgument</code> override here handles the passage of references
* of client to the server ,so that the server
- * can issue callbacks back to the client using
+ * can issue callbacks back to the client using
* those references.
* </pre>
* @see org.apache.excalibur.altrmi.client.ClientInvocationHandler#resolveArgument(String, Class, Object)
@@ -80,7 +80,7 @@
Class inputArgumentClass,
Object inputArgumentInstance)
{
-
+
//System.out.println("callback class["+inputArgumentClass+"] obj["+inputArgumentInstance+"]");
if( inputArgumentClass != null)
{
@@ -105,7 +105,7 @@
{
exposeObject( inputArgumentInstance, inputArgumentClass );
}
- catch( AltrmiCallbackException ace )
+ catch( CallbackException ace )
{
ace.printStackTrace();
}
@@ -117,11 +117,11 @@
}
}
}
-
+
return inputArgumentInstance;
}
-
-
+
+
}
1.9 +25 -25 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java
Index: CallbackEnabledClientCustomStreamReadWriter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/callback/stream/CallbackEnabledClientCustomStreamReadWriter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- CallbackEnabledClientCustomStreamReadWriter.java 13 Dec 2002 00:09:13 -0000 1.8
+++ CallbackEnabledClientCustomStreamReadWriter.java 5 Jan 2003 23:24:09 -0000 1.9
@@ -16,11 +16,11 @@
import java.io.EOFException;
import java.util.HashMap;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
-import org.apache.excalibur.altrmi.common.AltrmiCallbackException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.CallbackException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.SerializationHelper;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import org.apache.excalibur.altrmi.server.AltrmiServer;
import org.apache.excalibur.altrmi.server.PublicationException;
import org.apache.excalibur.altrmi.server.impl.classretrievers.PlainClassRetriever;
@@ -40,7 +40,7 @@
{
//Mutex to block the client till a reply reaches back from server
private Object m_replyLock = new Object();
- private AltrmiReply m_reply = null;
+ private Reply m_reply = null;
private Thread m_messageLoopThread = null;
private boolean m_isStopped = false;
private DataInputStream m_dataInputStream;
@@ -57,11 +57,11 @@
* @param inputStream The input stream
* @param outputStream The output stream
*
- * @throws AltrmiConnectionException The IO Exception
+ * @throws ConnectionException The IO Exception
*
*/
public CallbackEnabledClientCustomStreamReadWriter( InputStream inputStream, OutputStream outputStream, ClassLoader interfacesClassLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
m_dataOutputStream = new DataOutputStream( new BufferedOutputStream( outputStream ) );
m_dataInputStream = new DataInputStream( inputStream );
@@ -79,7 +79,7 @@
}
catch( Exception e )
{
- throw new AltrmiConnectionException( "Error Starting Internal AltrmiServer" );
+ throw new ConnectionException( "Error Starting Internal AltrmiServer" );
}
}
@@ -104,17 +104,17 @@
//_replyQueue.addFirst(SerializationHelper.getInstanceFromBytes(byteArray, m_interfacesClassLoader));
Object obj = SerializationHelper.getInstanceFromBytes( byteArray, m_interfacesClassLoader );
- if( obj instanceof AltrmiReply )
+ if( obj instanceof Reply )
{
- m_reply = (AltrmiReply)obj;
+ m_reply = (Reply)obj;
synchronized( m_replyLock )
{
m_replyLock.notify();
}
}
- else if( obj instanceof AltrmiRequest )
+ else if( obj instanceof Request )
{
- AltrmiReply altrmiReply = m_clientServerHostingExposedObjects.handleInvocation( (AltrmiRequest)obj );
+ Reply altrmiReply = m_clientServerHostingExposedObjects.handleInvocation( (Request)obj );
postReply( altrmiReply );
}
else
@@ -150,9 +150,9 @@
/**
* Method getReplyFromMessageLoop.
* Returns the reply recevied from the server
- * @return AltrmiReply
+ * @return Reply
*/
- public AltrmiReply getReplyFromMessageLoop()
+ public Reply getReplyFromMessageLoop()
{
if( m_reply == null )
{
@@ -172,15 +172,15 @@
}
/*
- * @see ClientStreamReadWriter#postRequest(AltrmiRequest)
+ * @see ClientStreamReadWriter#postRequest(Request)
*/
- public AltrmiReply postRequest( AltrmiRequest altrmiRequest )
+ public Reply postRequest( Request altrmiRequest )
throws IOException, ClassNotFoundException
{
if( m_isStopped )
throw new IOException( "Server Stoppped" );
writeRequest( altrmiRequest );
- AltrmiReply r = readReply();
+ Reply r = readReply();
m_reply = null;
return r;
}
@@ -190,7 +190,7 @@
* @param altrmiRequest
* @throws IOException
*/
- private void writeRequest( AltrmiRequest altrmiRequest ) throws IOException
+ private void writeRequest( Request altrmiRequest ) throws IOException
{
byte[] aBytes = SerializationHelper.getBytesFromInstance( altrmiRequest );
@@ -202,11 +202,11 @@
/**
* Method readReply.
- * @return AltrmiReply
+ * @return Reply
* @throws IOException
* @throws ClassNotFoundException
*/
- private AltrmiReply readReply() throws IOException, ClassNotFoundException
+ private Reply readReply() throws IOException, ClassNotFoundException
{
return getReplyFromMessageLoop();
@@ -218,7 +218,7 @@
* @throws IOException
* @throws ClassNotFoundException
*/
- public void postReply( AltrmiReply altrmiReply ) throws IOException, ClassNotFoundException
+ public void postReply( Reply altrmiReply ) throws IOException, ClassNotFoundException
{
byte[] aBytes = SerializationHelper.getBytesFromInstance( altrmiReply );
@@ -234,9 +234,9 @@
* @param tobeExposedObject
* @param tobeExposedInterface
* @return boolean
- * @throws AltrmiCallbackException
+ * @throws CallbackException
*/
- public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws AltrmiCallbackException
+ public boolean exposeObject( Object tobeExposedObject, Class tobeExposedInterface ) throws CallbackException
{
if( m_exposedObjPublishNameHash_.get( tobeExposedObject ) != null )
return false;
@@ -248,7 +248,7 @@
}
catch( PublicationException pce )
{
- throw new AltrmiCallbackException( pce.getMessage() );
+ throw new CallbackException( pce.getMessage() );
}
return true;
}
1.7 +10 -10 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/AbstractDirectInvocationHandler.java
Index: AbstractDirectInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/AbstractDirectInvocationHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractDirectInvocationHandler.java 5 Jan 2003 23:11:26 -0000 1.6
+++ AbstractDirectInvocationHandler.java 5 Jan 2003 23:24:09 -0000 1.7
@@ -10,9 +10,9 @@
import java.io.IOException;
import org.apache.excalibur.altrmi.client.ConnectionListener;
import org.apache.excalibur.altrmi.client.impl.AbstractClientInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.InvocationException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.MethodRequest;
import org.apache.excalibur.altrmi.common.NoSuchReferenceException;
import org.apache.excalibur.altrmi.common.NoSuchReferenceReply;
@@ -20,7 +20,7 @@
import org.apache.excalibur.altrmi.common.NotPublishedReply;
import org.apache.excalibur.altrmi.common.PublishedNameRequest;
import org.apache.excalibur.altrmi.common.TryLaterReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequestConstants;
+import org.apache.excalibur.altrmi.common.RequestConstants;
/**
* Class DirectInvocationHandler
@@ -59,16 +59,16 @@
* @return
*
*/
- public AltrmiReply handleInvocation( AltrmiRequest request )
+ public Reply handleInvocation( Request request )
{
- if( request.getRequestCode() != AltrmiRequestConstants.PINGREQUEST )
+ if( request.getRequestCode() != RequestConstants.PINGREQUEST )
{
m_lastRealRequest = System.currentTimeMillis();
}
boolean again = true;
- AltrmiReply reply = null;
+ Reply reply = null;
int tries = 0;
long start = 0;
@@ -135,7 +135,7 @@
{
// blimey how do we reconnect this?
- throw new AltrmiInvocationException( "Direct connection broken, unable to reconnect." );
+ throw new InvocationException( "Direct connection broken, unable to reconnect." );
}
/**
@@ -150,5 +150,5 @@
return m_lastRealRequest;
}
- protected abstract AltrmiReply performInvocation( AltrmiRequest request ) throws IOException;
+ protected abstract Reply performInvocation( Request request ) throws IOException;
}
1.4 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectHostContext.java
Index: DirectHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectHostContext.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- DirectHostContext.java 24 Apr 2002 12:42:57 -0000 1.3
+++ DirectHostContext.java 5 Jan 2003 23:24:09 -0000 1.4
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client.impl.direct;
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationHandler;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.InvocationHandler;
/**
* Class DirectHostContext
@@ -27,11 +27,11 @@
*
* @param altrmiInvocationHandler
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public DirectHostContext( AltrmiInvocationHandler altrmiInvocationHandler )
- throws AltrmiConnectionException
+ public DirectHostContext( InvocationHandler altrmiInvocationHandler )
+ throws ConnectionException
{
super( new DirectInvocationHandler( altrmiInvocationHandler ) );
}
1.7 +10 -10 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectInvocationHandler.java
Index: DirectInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectInvocationHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DirectInvocationHandler.java 4 Jan 2003 22:17:18 -0000 1.6
+++ DirectInvocationHandler.java 5 Jan 2003 23:24:09 -0000 1.7
@@ -8,10 +8,10 @@
package org.apache.excalibur.altrmi.client.impl.direct;
import java.io.IOException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.InvocationHandler;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
/**
* Class DirectInvocationHandler
@@ -23,7 +23,7 @@
public final class DirectInvocationHandler extends AbstractDirectInvocationHandler
{
- private AltrmiInvocationHandler m_altrmiInvocationHandler;
+ private InvocationHandler m_altrmiInvocationHandler;
/**
* Constructor DirectInvocationHandler
@@ -31,16 +31,16 @@
*
* @param altrmiInvocationHandler
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public DirectInvocationHandler( AltrmiInvocationHandler altrmiInvocationHandler )
- throws AltrmiConnectionException
+ public DirectInvocationHandler( InvocationHandler altrmiInvocationHandler )
+ throws ConnectionException
{
m_altrmiInvocationHandler = altrmiInvocationHandler;
}
- protected AltrmiReply performInvocation( AltrmiRequest request ) throws IOException
+ protected Reply performInvocation( Request request ) throws IOException
{
return m_altrmiInvocationHandler.handleInvocation( request );
}
1.3 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectMarshalledHostContext.java
Index: DirectMarshalledHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectMarshalledHostContext.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DirectMarshalledHostContext.java 24 Apr 2002 12:42:57 -0000 1.2
+++ DirectMarshalledHostContext.java 5 Jan 2003 23:24:09 -0000 1.3
@@ -8,8 +8,8 @@
package org.apache.excalibur.altrmi.client.impl.direct;
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiMarshalledInvocationHandler;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.MarshalledInvocationHandler;
/**
* Class DirectHostContext
@@ -27,11 +27,11 @@
*
* @param altrmiInvocationHandler
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public DirectMarshalledHostContext( AltrmiMarshalledInvocationHandler altrmiInvocationHandler )
- throws AltrmiConnectionException
+ public DirectMarshalledHostContext( MarshalledInvocationHandler altrmiInvocationHandler )
+ throws ConnectionException
{
this( altrmiInvocationHandler, DirectMarshalledHostContext.class.getClassLoader() );
}
@@ -43,12 +43,12 @@
* @param altrmiInvocationHandler
* @param classLoader
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public DirectMarshalledHostContext(
- AltrmiMarshalledInvocationHandler altrmiInvocationHandler, ClassLoader classLoader )
- throws AltrmiConnectionException
+ MarshalledInvocationHandler altrmiInvocationHandler, ClassLoader classLoader )
+ throws ConnectionException
{
super( new DirectMarshalledInvocationHandler( altrmiInvocationHandler, classLoader ) );
}
1.7 +14 -14 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectMarshalledInvocationHandler.java
Index: DirectMarshalledInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/direct/DirectMarshalledInvocationHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DirectMarshalledInvocationHandler.java 4 Jan 2003 22:17:18 -0000 1.6
+++ DirectMarshalledInvocationHandler.java 5 Jan 2003 23:24:09 -0000 1.7
@@ -8,10 +8,10 @@
package org.apache.excalibur.altrmi.client.impl.direct;
import java.io.IOException;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiMarshalledInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.MarshalledInvocationHandler;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.RequestFailedReply;
import org.apache.excalibur.altrmi.common.SerializationHelper;
@@ -25,7 +25,7 @@
public final class DirectMarshalledInvocationHandler extends AbstractDirectInvocationHandler
{
- private AltrmiMarshalledInvocationHandler m_altrmiInvocationHandler;
+ private MarshalledInvocationHandler m_altrmiInvocationHandler;
private ClassLoader m_interfacesClassLoader;
/**
@@ -34,12 +34,12 @@
*
* @param altrmiInvocationHandler
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public DirectMarshalledInvocationHandler(
- AltrmiMarshalledInvocationHandler altrmiInvocationHandler )
- throws AltrmiConnectionException
+ MarshalledInvocationHandler altrmiInvocationHandler )
+ throws ConnectionException
{
m_altrmiInvocationHandler = altrmiInvocationHandler;
m_interfacesClassLoader = this.getClass().getClassLoader();
@@ -52,18 +52,18 @@
* @param altrmiInvocationHandler
* @param classLoader
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public DirectMarshalledInvocationHandler(
- AltrmiMarshalledInvocationHandler altrmiInvocationHandler, ClassLoader classLoader )
- throws AltrmiConnectionException
+ MarshalledInvocationHandler altrmiInvocationHandler, ClassLoader classLoader )
+ throws ConnectionException
{
m_altrmiInvocationHandler = altrmiInvocationHandler;
m_interfacesClassLoader = classLoader;
}
- protected AltrmiReply performInvocation( AltrmiRequest request ) throws IOException
+ protected Reply performInvocation( Request request ) throws IOException
{
try
@@ -71,7 +71,7 @@
byte[] serRequest = SerializationHelper.getBytesFromInstance( request );
byte[] serReply = m_altrmiInvocationHandler.handleInvocation( serRequest );
- return (AltrmiReply)SerializationHelper.getInstanceFromBytes( serReply,
+ return (Reply)SerializationHelper.getInstanceFromBytes( serReply,
m_interfacesClassLoader );
}
catch( IOException e )
1.7 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/ClientHttpReadWriter.java
Index: ClientHttpReadWriter.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/ClientHttpReadWriter.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ClientHttpReadWriter.java 4 Jan 2003 21:31:46 -0000 1.6
+++ ClientHttpReadWriter.java 5 Jan 2003 23:24:10 -0000 1.7
@@ -11,8 +11,8 @@
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
-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.SerializationHelper;
import java.io.ByteArrayInputStream;
@@ -31,7 +31,7 @@
m_interfacesClassLoader = interfacesClassLoader;
}
- public AltrmiReply postRequest(AltrmiRequest altrmiRequest)
+ public Reply postRequest(Request altrmiRequest)
throws IOException, ClassNotFoundException
{
@@ -59,7 +59,7 @@
//}
//System.out.println("--> resp " + response.length);
- return (AltrmiReply) SerializationHelper.getInstanceFromBytes( response, m_interfacesClassLoader );
+ return (Reply) SerializationHelper.getInstanceFromBytes( response, m_interfacesClassLoader );
}
}
1.2 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/CustomHttpHostContext.java
Index: CustomHttpHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/CustomHttpHostContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CustomHttpHostContext.java 13 Dec 2002 00:09:14 -0000 1.1
+++ CustomHttpHostContext.java 5 Jan 2003 23:24:10 -0000 1.2
@@ -10,7 +10,7 @@
import org.apache.excalibur.altrmi.client.impl.piped.PipedCustomStreamHostContext;
import org.apache.excalibur.altrmi.client.impl.AbstractSameVmBindableHostContext;
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
@@ -36,10 +36,10 @@
* @param host
* @param port
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public CustomHttpHostContext( String host, int port ) throws AltrmiConnectionException
+ public CustomHttpHostContext( String host, int port ) throws ConnectionException
{
super( new CustomHttpInvocationHandler( host, port,
@@ -56,11 +56,11 @@
* @param port
* @param classLoader
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public CustomHttpHostContext( String host, int port, ClassLoader classLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( new CustomHttpInvocationHandler( host, port, classLoader ) );
m_port = port;
@@ -69,9 +69,9 @@
/**
* Make a HostContext for this using SameVM connections nstead of socket based ones.
* @return the HostContext
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*/
- public AbstractHostContext makeSameVmHostContext() throws AltrmiConnectionException
+ public AbstractHostContext makeSameVmHostContext() throws ConnectionException
{
PipedInputStream in = new PipedInputStream();
PipedOutputStream out = new PipedOutputStream();
@@ -94,7 +94,7 @@
}
catch (Exception e)
{
- throw new AltrmiConnectionException("Naming exception during bind :" + e.getMessage());
+ throw new ConnectionException("Naming exception during bind :" + e.getMessage());
}
}
1.3 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/CustomHttpInvocationHandler.java
Index: CustomHttpInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/http/CustomHttpInvocationHandler.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CustomHttpInvocationHandler.java 16 Dec 2002 01:00:01 -0000 1.2
+++ CustomHttpInvocationHandler.java 5 Jan 2003 23:24:10 -0000 1.3
@@ -8,7 +8,7 @@
package org.apache.excalibur.altrmi.client.impl.http;
import org.apache.excalibur.altrmi.client.impl.stream.StreamInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class SocketCustomStreamInvocationHandler
@@ -31,11 +31,11 @@
* @param port the port
* @param classLoader the classloader for deserialization hints.
*
- * @throws AltrmiConnectionException if a problem
+ * @throws ConnectionException if a problem
*
*/
public CustomHttpInvocationHandler( String host, int port, ClassLoader classLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( classLoader );
m_host = host;
1.7 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/AbstractMultipleInvocationHandler.java
Index: AbstractMultipleInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/AbstractMultipleInvocationHandler.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AbstractMultipleInvocationHandler.java 5 Jan 2003 23:11:27 -0000 1.6
+++ AbstractMultipleInvocationHandler.java 5 Jan 2003 23:24:10 -0000 1.7
@@ -11,7 +11,7 @@
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
import org.apache.excalibur.altrmi.client.ConnectionListener;
import org.apache.excalibur.altrmi.client.ConnectionPinger;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class AbstractMultipleInvocationHandler
@@ -58,10 +58,10 @@
* Method initialize
*
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public void initialize() throws AltrmiConnectionException
+ public void initialize() throws ConnectionException
{
}
@@ -118,6 +118,6 @@
public Object resolveArgument(String methodSignature ,Class objClass , Object obj)
{
return obj;
- }
-
+ }
+
}
1.8 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/RotatingMultipleInvocationHandler.java
Index: RotatingMultipleInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/multiple/RotatingMultipleInvocationHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- RotatingMultipleInvocationHandler.java 5 Jan 2003 23:11:27 -0000 1.7
+++ RotatingMultipleInvocationHandler.java 5 Jan 2003 23:24:10 -0000 1.8
@@ -4,9 +4,9 @@
import java.util.Iterator;
import java.util.List;
import org.apache.excalibur.altrmi.client.ClientInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.InvocationException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.OpenConnectionReply;
import org.apache.excalibur.altrmi.common.OpenConnectionRequest;
import org.apache.excalibur.altrmi.common.PingReply;
@@ -35,7 +35,7 @@
* @return
*
*/
- public AltrmiReply handleInvocation( AltrmiRequest request )
+ public Reply handleInvocation( Request request )
{
if( request instanceof Sessionable )
@@ -51,7 +51,7 @@
}
else
{
- throw new AltrmiInvocationException( "No handler registered for ths session" );
+ throw new InvocationException( "No handler registered for ths session" );
}
}
else if( request instanceof OpenConnectionRequest )
@@ -65,7 +65,7 @@
ClientInvocationHandler cih =
(ClientInvocationHandler)hostContexts.get( m_next++ );
- AltrmiReply ar = cih.handleInvocation( request );
+ Reply ar = cih.handleInvocation( request );
if( ar instanceof OpenConnectionReply )
{
@@ -78,7 +78,7 @@
}
else if( request instanceof PingRequest )
{
- AltrmiReply pingReply = null;
+ Reply pingReply = null;
List hostContexts = m_multipleHostContext.getHostContexts();
for( Iterator iterator = hostContexts.iterator(); iterator.hasNext(); )
@@ -88,7 +88,7 @@
try
{
- AltrmiReply ar = cih.handleInvocation( request );
+ Reply ar = cih.handleInvocation( request );
if( ( pingReply == null ) && ( ar instanceof PingReply ) )
{
1.8 +4 -4 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiContext.java
Index: DefaultAltrmiContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/naming/DefaultAltrmiContext.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- DefaultAltrmiContext.java 5 Jan 2003 23:11:27 -0000 1.7
+++ DefaultAltrmiContext.java 5 Jan 2003 23:24:10 -0000 1.8
@@ -16,7 +16,7 @@
import org.apache.excalibur.altrmi.client.InterfaceLookup;
import org.apache.excalibur.altrmi.client.InterfaceLookupFactory;
import org.apache.excalibur.altrmi.client.impl.DefaultInterfaceLookupFactory;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class DefaultAltrmiContext
@@ -139,7 +139,7 @@
+ proxyDetails + ":"
+ beanDetails, interfacesClassLoader, optimize );
}
- catch( AltrmiConnectionException ace )
+ catch( ConnectionException ace )
{
ace.printStackTrace();
@@ -182,7 +182,7 @@
{
return m_altrmiInterfaceLookup.lookup( name );
}
- catch( AltrmiConnectionException ace )
+ catch( ConnectionException ace )
{
ace.printStackTrace();
1.9 +9 -9 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/AbstractPipedStreamInvocationHandler.java
Index: AbstractPipedStreamInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/AbstractPipedStreamInvocationHandler.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AbstractPipedStreamInvocationHandler.java 4 Jan 2003 22:17:18 -0000 1.8
+++ AbstractPipedStreamInvocationHandler.java 5 Jan 2003 23:24:10 -0000 1.9
@@ -14,8 +14,8 @@
import java.io.PipedOutputStream;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
import org.apache.excalibur.altrmi.client.impl.stream.StreamInvocationHandler;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiInvocationException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.InvocationException;
/**
* Class AbstractPipedStreamInvocationHandler
@@ -38,12 +38,12 @@
* @param os
* @param interfacesClassLoader
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public AbstractPipedStreamInvocationHandler(
PipedInputStream is, PipedOutputStream os, ClassLoader interfacesClassLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( interfacesClassLoader );
@@ -56,10 +56,10 @@
* Method initialize
*
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
- public void initialize() throws AltrmiConnectionException
+ public void initialize() throws ConnectionException
{
setObjectReadWriter( createClientStreamReadWriter( m_inputStream, m_outputStream ) );
super.initialize();
@@ -69,10 +69,10 @@
{
// blimey how do we reconnect this?
- throw new AltrmiInvocationException( "Piped connection broken, unable to reconnect." );
+ throw new InvocationException( "Piped connection broken, unable to reconnect." );
}
protected abstract ClientStreamReadWriter createClientStreamReadWriter(
- InputStream in, OutputStream out ) throws AltrmiConnectionException;
+ InputStream in, OutputStream out ) throws ConnectionException;
}
1.5 +6 -6 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/PipedCustomStreamHostContext.java
Index: PipedCustomStreamHostContext.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/PipedCustomStreamHostContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PipedCustomStreamHostContext.java 4 Jan 2003 22:17:18 -0000 1.4
+++ PipedCustomStreamHostContext.java 5 Jan 2003 23:24:10 -0000 1.5
@@ -11,7 +11,7 @@
import java.io.PipedInputStream;
import java.io.PipedOutputStream;
import org.apache.excalibur.altrmi.client.impl.AbstractHostContext;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
+import org.apache.excalibur.altrmi.common.ConnectionException;
/**
* Class PipedCustomStreamHostContext
@@ -31,12 +31,12 @@
* @param inputStream
* @param outputStream
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public PipedCustomStreamHostContext( PipedInputStream inputStream,
PipedOutputStream outputStream )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( new PipedCustomStreamInvocationHandler( inputStream, outputStream ) );
}
@@ -45,10 +45,10 @@
* Method initialize
*
*
- * @throws AltrmiConnectionException If a problem
+ * @throws ConnectionException If a problem
*
*/
- public void initialize() throws AltrmiConnectionException
+ public void initialize() throws ConnectionException
{
( (PipedCustomStreamInvocationHandler)m_altrmiClientInvocationHandler ).initialize();
}
1.6 +10 -10 jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/PipedCustomStreamInvocationHandler.java
Index: PipedCustomStreamInvocationHandler.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/client/impl/piped/PipedCustomStreamInvocationHandler.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PipedCustomStreamInvocationHandler.java 13 Dec 2002 00:09:13 -0000 1.5
+++ PipedCustomStreamInvocationHandler.java 5 Jan 2003 23:24:10 -0000 1.6
@@ -15,9 +15,9 @@
import org.apache.excalibur.altrmi.client.impl.stream.ClientCustomStreamReadWriter;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
import org.apache.excalibur.altrmi.client.impl.ClientStreamReadWriter;
-import org.apache.excalibur.altrmi.common.AltrmiConnectionException;
-import org.apache.excalibur.altrmi.common.AltrmiReply;
-import org.apache.excalibur.altrmi.common.AltrmiRequest;
+import org.apache.excalibur.altrmi.common.ConnectionException;
+import org.apache.excalibur.altrmi.common.Reply;
+import org.apache.excalibur.altrmi.common.Request;
import org.apache.excalibur.altrmi.common.MethodRequest;
/**
@@ -37,11 +37,11 @@
* @param inputStream
* @param outputStream
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public PipedCustomStreamInvocationHandler( PipedInputStream inputStream, PipedOutputStream outputStream )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( inputStream, outputStream, PipedCustomStreamInvocationHandler.class.getClassLoader() );
}
@@ -54,18 +54,18 @@
* @param outputStream
* @param interfacesClassLoader
*
- * @throws AltrmiConnectionException
+ * @throws ConnectionException
*
*/
public PipedCustomStreamInvocationHandler(
PipedInputStream inputStream, PipedOutputStream outputStream, ClassLoader interfacesClassLoader )
- throws AltrmiConnectionException
+ throws ConnectionException
{
super( inputStream, outputStream, interfacesClassLoader );
}
protected ClientStreamReadWriter createClientStreamReadWriter(
- InputStream inputStream, OutputStream outputStream ) throws AltrmiConnectionException
+ InputStream inputStream, OutputStream outputStream ) throws ConnectionException
{
return new ClientCustomStreamReadWriter( inputStream, outputStream,
@@ -74,7 +74,7 @@
}
protected ClientStreamReadWriter createClientStreamReadWriter(
- InputStream inputStream, OutputStream outputStream, ClassLoader classLoader ) throws AltrmiConnectionException
+ InputStream inputStream, OutputStream outputStream, ClassLoader classLoader ) throws ConnectionException
{
return new ClientCustomStreamReadWriter( inputStream, outputStream, classLoader );
}
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>