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 2002/09/26 08:23:54 UTC

cvs commit: jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback CallbackHostContext.java CallbackServerClassAltrmiFactory.java

hammant     2002/09/25 23:23:54

  Modified:    altrmi   build.xml
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters
                        InvocationHandlerAdapter.java
                        MarshalledInvocationHandlerAdapter.java
                        PublicationAdapter.java
               altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback
                        CallbackHostContext.java
                        CallbackServerClassAltrmiFactory.java
  Log:
  More checkstyle compliance.
  
  Revision  Changes    Path
  1.39      +2 -0      jakarta-avalon-excalibur/altrmi/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/build.xml,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- build.xml	21 Sep 2002 15:52:56 -0000	1.38
  +++ build.xml	26 Sep 2002 06:23:54 -0000	1.39
  @@ -321,6 +321,8 @@
                   <include name="org/apache/excalibur/altrmi/generator/*.java"/>
                   <include name="org/apache/excalibur/altrmi/server/*.java"/>
                   <include name="org/apache/excalibur/altrmi/server/impl/*.java"/>                
  +                <include name="org/apache/excalibur/altrmi/server/impl/adapters/*.java"/>
  +                <include name="org/apache/excalibur/altrmi/server/impl/callback/*.java"/>
                   <include name="org/apache/excalibur/altrmi/server/impl/classretrievers/*.java"/>
                   <include name="org/apache/excalibur/altrmi/server/impl/rmi/*.java"/>
                   <include name="org/apache/excalibur/altrmi/server/impl/socket/*.java"/>
  
  
  
  1.8       +113 -56   jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/InvocationHandlerAdapter.java
  
  Index: InvocationHandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/InvocationHandlerAdapter.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- InvocationHandlerAdapter.java	23 May 2002 21:37:21 -0000	1.7
  +++ InvocationHandlerAdapter.java	26 Sep 2002 06:23:54 -0000	1.8
  @@ -56,49 +56,49 @@
   {
   
       private static int SESSION = 0;
  -    private Long mLastSession = new Long( 0 );
  -    private HashMap mSessions = new HashMap();
  -    private boolean mSuspend = false;
  -    private ClassRetriever mClassRetriever = new NoClassRetriever();
  -    private AltrmiAuthenticator mAltrmiAuthenticator = new DefaultAuthenticator();
  +    private Long m_lastSession = new Long( 0 );
  +    private HashMap m_sessions = new HashMap();
  +    private boolean m_suspend = false;
  +    private ClassRetriever m_classRetriever = new NoClassRetriever();
  +    private AltrmiAuthenticator m_altrmiAuthenticator = new DefaultAuthenticator();
   
       /**
  -     * Method setClassRetriever
  +     * Set a ClassRetriever
        *
        *
  -     * @param classRetriever
  +     * @param classRetriever The class retriever
        *
        */
       public final void setClassRetriever( ClassRetriever classRetriever )
       {
  -        mClassRetriever = classRetriever;
  +        m_classRetriever = classRetriever;
       }
   
       /**
  -     * Method setAuthenticator
  +     * Set an Authenticator
        *
        *
  -     * @param altrmiAuthenticator
  +     * @param altrmiAuthenticator The authenticator
        *
        */
       public final void setAuthenticator( AltrmiAuthenticator altrmiAuthenticator )
       {
  -        mAltrmiAuthenticator = altrmiAuthenticator;
  +        m_altrmiAuthenticator = altrmiAuthenticator;
       }
   
       /**
  -     * Method handleInvocation
  +     * Handle an invocation
        *
        *
  -     * @param request
  +     * @param request The request
        *
  -     * @return
  +     * @return The reply.
        *
        */
       public AltrmiReply handleInvocation( AltrmiRequest request )
       {
   
  -        if( mSuspend == true )
  +        if( m_suspend == true )
           {
               return new SuspendedReply();
           }
  @@ -151,13 +151,18 @@
           }
       }
   
  +    /**
  +     * Do a Method Facade Request
  +     * @param request the request
  +     * @return The reply
  +     */
       private AltrmiReply doMethodFacadeRequest( AltrmiRequest request )
       {
           MethodFacadeRequest mFacReq = (MethodFacadeRequest)request;
           String publishedThing = mFacReq.getPublishedServiceName() + "_"
               + mFacReq.getObjectName();
   
  -        if( !mPublishedObjects.containsKey( publishedThing ) )
  +        if( !isPublished( publishedThing ) )
           {
               return new NotPublishedReply();
           }
  @@ -169,7 +174,7 @@
           }
   
           MethodInvocationHandler methodInvocationHandler =
  -            (MethodInvocationHandler)mPublishedObjects.get( publishedThing );
  +            getMethodInvocationHandler( publishedThing );
           AltrmiReply ar = methodInvocationHandler.handleMethodInvocation( mFacReq );
   
           if( ar.getReplyCode() == AltrmiReplyConstants.EXCEPTIONREPLY )
  @@ -205,7 +210,14 @@
           }
       }
   
  -    private AltrmiReply doMethodFacadeRequestArray( Object methodReply, MethodFacadeRequest mFacReq )
  +    /**
  +     * Do a method facade request, returning an array
  +     * @param methodReply The array to process.
  +     * @param methodFacadeRequest The request
  +     * @return The reply
  +     */
  +    private AltrmiReply doMethodFacadeRequestArray(
  +            Object methodReply, MethodFacadeRequest methodFacadeRequest )
       {
           Object[] beanImpls = (Object[])methodReply;
           Long[] refs = new Long[ beanImpls.length ];
  @@ -214,14 +226,14 @@
           for( int i = 0; i < beanImpls.length; i++ )
           {
               Object impl = beanImpls[ i ];
  -            MethodInvocationHandler mainMethodInvocationHandler = (MethodInvocationHandler)
  -                mPublishedObjects.get( mFacReq.getPublishedServiceName() + "_Main" );
  +            MethodInvocationHandler mainMethodInvocationHandler =
  +              getMethodInvocationHandler(methodFacadeRequest.getPublishedServiceName() + "_Main" );
   
  -            objectNames[ i ] = encodeClassName( mainMethodInvocationHandler.getMostDerivedType( beanImpls[ i ] ).getName() );
  +            objectNames[ i ] = encodeClassName(
  +                    mainMethodInvocationHandler.getMostDerivedType( beanImpls[ i ] ).getName() );
   
               MethodInvocationHandler methodInvocationHandler2 =
  -                (MethodInvocationHandler)mPublishedObjects
  -                .get( mFacReq.getPublishedServiceName() + "_"
  +                getMethodInvocationHandler( methodFacadeRequest.getPublishedServiceName() + "_"
                         + objectNames[ i ] );
   
               if( methodInvocationHandler2 == null )
  @@ -229,7 +241,7 @@
                   return new NotPublishedReply();
               }
   
  -            if( !sessionExists( mFacReq.getSession() ) )
  +            if( !sessionExists( methodFacadeRequest.getSession() ) )
               {
                   return new ExceptionReply(
                       new AltrmiInvocationException( "TODO - you dirty rat/hacker" ) );
  @@ -245,7 +257,8 @@
                   refs[ i ] =
                       methodInvocationHandler2.getOrMakeReferenceIDForBean( beanImpls[ i ] );
   
  -                AltrmiSession sess = (AltrmiSession)mSessions.get( mFacReq.getSession() );
  +                AltrmiSession sess = (AltrmiSession)m_sessions.get(
  +                        methodFacadeRequest.getSession() );
   
                   sess.addBeanInUse( refs[ i ], beanImpls[ i ] );
               }
  @@ -254,24 +267,31 @@
           return new MethodFacadeArrayReply( refs, objectNames );
       }
   
  -    private AltrmiReply doMethodFacadeRequestNonArray( Object beanImpl, MethodFacadeRequest mFacReq )
  +    /**
  +     * Do a method facade request, returning things other that an array
  +     * @param beanImpl The returned object to process.
  +     * @param methodFacadeRequest The request
  +     * @return The reply
  +     */
  +    private AltrmiReply doMethodFacadeRequestNonArray(
  +            Object beanImpl, MethodFacadeRequest methodFacadeRequest )
       {
   
  -        MethodInvocationHandler mainMethodInvocationHandler = (MethodInvocationHandler)
  -            mPublishedObjects.get( mFacReq.getPublishedServiceName() + "_Main" );
  +        MethodInvocationHandler mainMethodInvocationHandler = getMethodInvocationHandler(
  +                methodFacadeRequest.getPublishedServiceName() + "_Main" );
   
  -        String objectName = encodeClassName( mainMethodInvocationHandler.getMostDerivedType( beanImpl ).getName() );
  +        String objectName = encodeClassName(
  +                mainMethodInvocationHandler.getMostDerivedType( beanImpl ).getName() );
   
  -        MethodInvocationHandler methodInvocationHandler =
  -            (MethodInvocationHandler)mPublishedObjects
  -            .get( mFacReq.getPublishedServiceName() + "_" + objectName );
  +        MethodInvocationHandler methodInvocationHandler =  getMethodInvocationHandler (
  +                methodFacadeRequest.getPublishedServiceName() + "_" + objectName );
   
           if( methodInvocationHandler == null )
           {
               return new NotPublishedReply();
           }
   
  -        if( !sessionExists( mFacReq.getSession() ) )
  +        if( !sessionExists( methodFacadeRequest.getSession() ) )
           {
               return new ExceptionReply(
                   new AltrmiInvocationException( "TODO - you dirty rat/hacker" ) );
  @@ -281,7 +301,7 @@
           Long newRef = methodInvocationHandler.getOrMakeReferenceIDForBean( beanImpl );
   
           // make sure the bean is not garbage collected.
  -        AltrmiSession sess = (AltrmiSession)mSessions.get( mFacReq.getSession() );
  +        AltrmiSession sess = (AltrmiSession)m_sessions.get( methodFacadeRequest.getSession() );
   
           sess.addBeanInUse( newRef, beanImpl );
   
  @@ -289,29 +309,39 @@
           return new MethodFacadeReply( newRef, objectName );
       }
   
  +    /**
  +     * Do a method request
  +     * @param request The request
  +     * @return The reply
  +     */
       private AltrmiReply doMethodRequest( AltrmiRequest request )
       {
           MethodRequest mReq = (MethodRequest)request;
           String publishedThing = mReq.getPublishedServiceName() + "_" + mReq.getObjectName();
   
  -        if( !mPublishedObjects.containsKey( publishedThing ) )
  +        if( !isPublished( publishedThing ) )
           {
               return new NotPublishedReply();
           }
   
           MethodInvocationHandler methodInvocationHandler =
  -            (MethodInvocationHandler)mPublishedObjects.get( publishedThing );
  +            getMethodInvocationHandler( publishedThing );
   
           return methodInvocationHandler.handleMethodInvocation( mReq );
       }
   
  +    /**
  +     * DO a lokkup request
  +     * @param request The request
  +     * @return The reply
  +     */
       private AltrmiReply doLookupRequest( AltrmiRequest request )
       {
           LookupRequest lr = (LookupRequest)request;
   
           try
           {
  -            mAltrmiAuthenticator.checkAuthority( lr.getAltrmiAuthentication(),
  +            m_altrmiAuthenticator.checkAuthority( lr.getAltrmiAuthentication(),
                                                    lr.getPublishedServiceName() );
           }
           catch( AltrmiAuthenticationException aae )
  @@ -323,6 +353,11 @@
           return new LookupReply( new Long( 0 ) );
       }
   
  +    /**
  +     * Do a class request
  +     * @param request The request
  +     * @return The reply
  +     */
       private AltrmiReply doClassRequest( AltrmiRequest request )
       {
           ClassRequest cr = (ClassRequest)request;
  @@ -330,8 +365,8 @@
   
           try
           {
  -            return new ClassReply( mClassRetriever.getBeanBytes( publishedThing ),
  -                                   mClassRetriever
  +            return new ClassReply( m_classRetriever.getBeanBytes( publishedThing ),
  +                                   m_classRetriever
                                      .getInterfaceImplementationBytes( publishedThing ) );
           }
           catch( ClassRetrievalException e )
  @@ -341,19 +376,27 @@
           }
       }
   
  +    /**
  +     * Do an OpenConnection request
  +     * @return The reply.
  +     */
       private AltrmiReply doOpenConnectionRequest()
       {
           Long session = getNewSession();
   
  -        mSessions.put( session, new AltrmiSession( session ) );
  +        m_sessions.put( session, new AltrmiSession( session ) );
   
  -        return new OpenConnectionReply( mAltrmiAuthenticator.getTextToSign(), session );
  +        return new OpenConnectionReply( m_altrmiAuthenticator.getTextToSign(), session );
       }
   
  +    /**
  +     * Do a ListRequest
  +     * @return The reply
  +     */
       private AltrmiReply doListRequest()
       {
           //return the list of published objects to the server
  -        Iterator iterator = mPublishedObjects.keySet().iterator();
  +        Iterator iterator = getIteratorOfPublishedObjects();
           Vector vecOfPublishedObjectNames = new Vector();
   
           while( iterator.hasNext() )
  @@ -366,20 +409,25 @@
               }
           }
   
  -        String[] _listOfPublishedObjectNames = new String[ vecOfPublishedObjectNames.size() ];
  +        String[] listOfPublishedObjectNames = new String[ vecOfPublishedObjectNames.size() ];
   
  -        System.arraycopy( vecOfPublishedObjectNames.toArray(), 0, _listOfPublishedObjectNames,
  +        System.arraycopy( vecOfPublishedObjectNames.toArray(), 0, listOfPublishedObjectNames,
                             0, vecOfPublishedObjectNames.size() );
   
  -        return new ListReply( _listOfPublishedObjectNames );
  +        return new ListReply( listOfPublishedObjectNames );
       }
   
  +    /**
  +     * Do a GarbageCollection Request
  +     * @param request The request
  +     * @return The reply
  +     */
       private AltrmiReply doGarbageCollectionRequest( AltrmiRequest request )
       {
           GarbageCollectionRequest gcr = (GarbageCollectionRequest)request;
           String publishedThing = gcr.getPublishedServiceName() + "_" + gcr.getObjectName();
   
  -        if( !mPublishedObjects.containsKey( publishedThing ) )
  +        if( !isPublished( publishedThing ) )
           {
               return new NotPublishedReply();
           }
  @@ -390,7 +438,7 @@
                   new AltrmiInvocationException( "TODO - you dirty rat/hacker" ) );
           }
   
  -        AltrmiSession sess = (AltrmiSession)mSessions.get( gcr.getSession() );
  +        AltrmiSession sess = (AltrmiSession)m_sessions.get( gcr.getSession() );
           if( sess == null )
           {
               System.out.println( "DEBUG- GC on missing session -" + gcr.getSession() );
  @@ -402,15 +450,20 @@
           sess.removeBeanInUse( gcr.getReferenceID() );
   
           MethodInvocationHandler methodInvocationHandler =
  -            (MethodInvocationHandler)mPublishedObjects.get( publishedThing );
  +            getMethodInvocationHandler( publishedThing );
   
           return new GarbageCollectionReply();
       }
   
  +    /**
  +     * Does a session exist
  +     * @param session The session
  +     * @return true if it exists
  +     */
       private boolean sessionExists( Long session )
       {
   
  -        if( mLastSession.equals( session ) )
  +        if( m_lastSession.equals( session ) )
           {
   
               // buffer last session for performance.
  @@ -418,9 +471,9 @@
           }
           else
           {
  -            if( mSessions.containsKey( session ) )
  +            if( m_sessions.containsKey( session ) )
               {
  -                mLastSession = session;
  +                m_lastSession = session;
   
                   return true;
               }
  @@ -429,6 +482,10 @@
           return false;
       }
   
  +    /**
  +     * Get a newsession
  +     * @return The session
  +     */
       private Long getNewSession()
       {
   
  @@ -437,20 +494,20 @@
       }
   
       /**
  -     * Method suspend
  +     * Suspend an AltRMI service
        *
        */
       public void suspend()
       {
  -        mSuspend = true;
  +        m_suspend = true;
       }
   
       /**
  -     * Method resume
  +     * Resume an AltRMI service
        *
        */
       public void resume()
       {
  -        mSuspend = false;
  +        m_suspend = false;
       }
   }
  
  
  
  1.3       +23 -16    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/MarshalledInvocationHandlerAdapter.java
  
  Index: MarshalledInvocationHandlerAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/MarshalledInvocationHandlerAdapter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- MarshalledInvocationHandlerAdapter.java	24 Apr 2002 12:43:01 -0000	1.2
  +++ MarshalledInvocationHandlerAdapter.java	26 Sep 2002 06:23:54 -0000	1.3
  @@ -24,44 +24,50 @@
   public class MarshalledInvocationHandlerAdapter implements AltrmiMarshalledInvocationHandler
   {
   
  -    private AltrmiInvocationHandler mAltrmiInvocationHandler;
  -    private ClassLoader mClassLoader;
  +    /**
  +     * The invocation hamdeler
  +     */
  +    private AltrmiInvocationHandler m_altrmiInvocationHandler;
  +    /**
  +     * The class loader.
  +     */
  +    private ClassLoader m_classLoader;
   
       /**
        * Constructor MarshalledInvocationHandlerAdapter
        *
        *
  -     * @param altrmiInvocationHandler
  +     * @param altrmiInvocationHandler The invocation handler
        *
        */
       public MarshalledInvocationHandlerAdapter( AltrmiInvocationHandler altrmiInvocationHandler )
       {
  -        mAltrmiInvocationHandler = altrmiInvocationHandler;
  -        mClassLoader = getClass().getClassLoader();
  +        m_altrmiInvocationHandler = altrmiInvocationHandler;
  +        m_classLoader = getClass().getClassLoader();
       }
   
       /**
        * Constructor MarshalledInvocationHandlerAdapter
        *
        *
  -     * @param altrmiInvocationHandler
  -     * @param classLoader
  +     * @param altrmiInvocationHandler The invocation handler
  +     * @param classLoader The classloader
        *
        */
       public MarshalledInvocationHandlerAdapter( AltrmiInvocationHandler altrmiInvocationHandler,
                                                  ClassLoader classLoader )
       {
  -        mAltrmiInvocationHandler = altrmiInvocationHandler;
  -        mClassLoader = classLoader;
  +        m_altrmiInvocationHandler = altrmiInvocationHandler;
  +        m_classLoader = classLoader;
       }
   
       /**
  -     * Method handleInvocation
  +     * Handle an Invocation
        *
        *
  -     * @param request
  +     * @param request The request
        *
  -     * @return
  +     * @return The reply
        *
        */
       public byte[] handleInvocation( byte[] request )
  @@ -69,9 +75,10 @@
   
           try
           {
  -            AltrmiRequest ar = (AltrmiRequest)SerializationHelper.getInstanceFromBytes( request,
  -                                                                                        mClassLoader );
  -            AltrmiReply reply = mAltrmiInvocationHandler.handleInvocation( ar );
  +            AltrmiRequest ar =
  +                    (AltrmiRequest) SerializationHelper.getInstanceFromBytes(
  +                            request, m_classLoader );
  +            AltrmiReply reply = m_altrmiInvocationHandler.handleInvocation( ar );
   
               return SerializationHelper.getBytesFromInstance( reply );
           }
  
  
  
  1.5       +69 -39    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/PublicationAdapter.java
  
  Index: PublicationAdapter.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/adapters/PublicationAdapter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PublicationAdapter.java	21 Sep 2002 15:52:57 -0000	1.4
  +++ PublicationAdapter.java	26 Sep 2002 06:23:54 -0000	1.5
  @@ -9,6 +9,8 @@
   
   import java.lang.reflect.Method;
   import java.util.HashMap;
  +import java.util.Iterator;
  +
   import org.apache.excalibur.altrmi.common.AbstractMethodHandler;
   import org.apache.excalibur.altrmi.common.MethodRequest;
   import org.apache.excalibur.altrmi.server.AltrmiPublisher;
  @@ -27,15 +29,38 @@
   public class PublicationAdapter extends AbstractMethodHandler implements AltrmiPublisher
   {
   
  -    protected HashMap mPublishedObjects = new HashMap();
  +    /**
  +     * A map of published objects.
  +     */
  +    private HashMap m_publishedObjects = new HashMap();
  +
  +    /**
  +     * Is the object published
  +     * @param publishedObjectName The published object name
  +     * @return true if published.
  +     */
  +    public boolean isPublished(String publishedObjectName)
  +    {
  +        return m_publishedObjects.containsKey(publishedObjectName);
  +    }
  +
  +    /**
  +     * Get an iterator of published objects
  +     * @return The iterator
  +     */
  +    public Iterator getIteratorOfPublishedObjects()
  +    {
  +        return m_publishedObjects.keySet().iterator();
  +    }
   
       /**
  -     * Method publish
  +     * Publish an Object
        *
        *
  -     * @param impl
  -     * @param asName
  -     * @param interfaceToExpose
  +     * @param impl The implementaion to publish
  +     * @param asName as this name.
  +     * @param interfaceToExpose The interface to expose.
  +     * @throws PublicationException if a problem during publication.
        *
        */
       public void publish( Object impl, String asName, Class interfaceToExpose )
  @@ -46,22 +71,23 @@
       }
   
       /**
  -     * Method publish
  +     * Publish an object
        *
        *
  -     * @param impl
  -     * @param asName
  -     * @param publicationDescription
  +     * @param impl The implementaion to publish
  +     * @param asName as this name.
  +     * @param publicationDescription a description of the publication.
  +     * @throws PublicationException if a problem during publication.
        *
        */
  -    public void publish( Object impl, String asName, PublicationDescription publicationDescription )
  -        throws PublicationException
  +    public void publish( Object impl, String asName,
  +        PublicationDescription publicationDescription ) throws PublicationException
       {
   
           Class[] interfacesToExpose = publicationDescription.getInterfacesToExpose();
           Class[] additionalFacades = publicationDescription.getAdditionalFacades();
   
  -        if( mPublishedObjects.containsKey( asName + "_Main" ) )
  +        if( m_publishedObjects.containsKey( asName + "_Main" ) )
           {
               throw new PublicationException( "Service '" + asName + "' already published" );
           }
  @@ -76,7 +102,8 @@
           // add method maps for main lookup-able service.
           HashMap mainMethodMap = new HashMap();
           MethodInvocationHandler mainMethodInvocationHandler =
  -            new DefaultMethodInvocationHandler( this, asName + "_Main", mainMethodMap, publicationDescription );
  +            new DefaultMethodInvocationHandler( this, asName + "_Main",
  +                    mainMethodMap, publicationDescription );
   
           mainMethodInvocationHandler.addImplementationBean( new Long( 0 ), impl );
   
  @@ -97,7 +124,7 @@
           }
   
           // as the main service is lookup-able, it has a prexisting impl.
  -        mPublishedObjects.put( asName + "_Main", mainMethodInvocationHandler );
  +        m_publishedObjects.put( asName + "_Main", mainMethodInvocationHandler );
   
           // add method maps for all the additional facades.
           for( int x = 0; x < additionalFacades.length; x++ )
  @@ -120,80 +147,83 @@
                   }
               }
   
  -            mPublishedObjects.put( asName + "_" + encodedClassName, methodInvocationHandler );
  +            m_publishedObjects.put( asName + "_" + encodedClassName, methodInvocationHandler );
           }
       }
   
       /**
  -     * Method unPublish
  +     * UnPublish an object
        *
        *
  -     * @param impl
  -     * @param publishedName
  +     * @param impl the object to unpublish
  +     * @param publishedName The name it was published as
  +     * @throws PublicationException if a problem during publication.
        *
        */
       public void unPublish( Object impl, String publishedName ) throws PublicationException
       {
   
  -        if( !mPublishedObjects.containsKey( publishedName + "_Main" ) )
  +        if( !m_publishedObjects.containsKey( publishedName + "_Main" ) )
           {
               throw new PublicationException( "Service '" + publishedName + "' not published" );
           }
   
  -        mPublishedObjects.remove( publishedName + "_Main" );
  +        m_publishedObjects.remove( publishedName + "_Main" );
       }
   
       /**
  -     * Method replacePublished
  +     * Replace a published impl
        *
        *
  -     * @param oldImpl
  -     * @param publishedName
  -     * @param withImpl
  +     * @param oldImpl the old published object
  +     * @param publishedName The name it was published as
  +     * @param withImpl The new published impl
  +     * @throws PublicationException if a problem during publication.
        *
        */
       public void replacePublished( Object oldImpl, String publishedName, Object withImpl )
           throws PublicationException
       {
   
  -        if( !mPublishedObjects.containsKey( publishedName + "_Main" ) )
  +        if( !m_publishedObjects.containsKey( publishedName + "_Main" ) )
           {
               throw new PublicationException( "Service '" + publishedName + "' not published" );
           }
   
  -        MethodInvocationHandler asih = (MethodInvocationHandler)mPublishedObjects.get( publishedName
  -                                                                                       + "_Main" );
  +        MethodInvocationHandler asih =
  +                (MethodInvocationHandler)m_publishedObjects.get( publishedName + "_Main" );
   
           asih.replaceImplementationBean( oldImpl, withImpl );
       }
   
       /**
  -     * Method getServerInvocationHandler
  +     * Get a Server's  InvocationHandler
        *
        *
  -     * @param mr
  -     * @param objectName
  +     * @param methodRequest The method Request.
  +     * @param objectName The object name.
        *
  -     * @return
  +     * @return the method invoation handler
        *
        */
  -    public MethodInvocationHandler getMethodInvocationHandler( MethodRequest mr, String objectName )
  +    public MethodInvocationHandler getMethodInvocationHandler( MethodRequest methodRequest,
  +                                                               String objectName )
       {
  -        return (MethodInvocationHandler)mPublishedObjects.get( mr.getPublishedServiceName() + "_"
  -                                                               + objectName );
  +        return (MethodInvocationHandler)m_publishedObjects.get(
  +                methodRequest.getPublishedServiceName() + "_" + objectName );
       }
   
       /**
  -     * Method getMethodInvocationHandler
  +     * Get a method's InvocationHandler
        *
        *
  -     * @param publishedName
  +     * @param publishedName The name of a published object
        *
  -     * @return
  +     * @return the method invoation handler
        *
        */
       public MethodInvocationHandler getMethodInvocationHandler( String publishedName )
       {
  -        return (MethodInvocationHandler)mPublishedObjects.get( publishedName );
  +        return (MethodInvocationHandler)m_publishedObjects.get( publishedName );
       }
   }
  
  
  
  1.3       +3 -3      jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackHostContext.java
  
  Index: CallbackHostContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackHostContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CallbackHostContext.java	24 Apr 2002 12:43:01 -0000	1.2
  +++ CallbackHostContext.java	26 Sep 2002 06:23:54 -0000	1.3
  @@ -20,8 +20,8 @@
   {
   
       /**
  -     * Method CallbackHostContext.
  -     * @param streamInvocationHandler
  +     * Construct a CallbackHostContext.
  +     * @param streamInvocationHandler The invocation handler.
        */
       public CallbackHostContext( StreamInvocationHandler streamInvocationHandler )
       {
  
  
  
  1.5       +15 -15    jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackServerClassAltrmiFactory.java
  
  Index: CallbackServerClassAltrmiFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/altrmi/src/java/org/apache/excalibur/altrmi/server/impl/callback/CallbackServerClassAltrmiFactory.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CallbackServerClassAltrmiFactory.java	23 May 2002 21:37:21 -0000	1.4
  +++ CallbackServerClassAltrmiFactory.java	26 Sep 2002 06:23:54 -0000	1.5
  @@ -35,24 +35,24 @@
   {
   
       /**
  -     * Constructor CallbackServerClassAltrmiFactory
  +     * Construct a CallbackServerClassAltrmiFactory
        *
        *
  -     * @param b
  +     * @param beanOnly if to make a bean-only client side proxy
        *
        */
  -    public CallbackServerClassAltrmiFactory( boolean b )
  +    public CallbackServerClassAltrmiFactory( boolean beanOnly )
       {
  -        super( b );
  +        super( beanOnly );
       }
   
       //hack method to influence OpenConnectionRequest/reply sequence
   
       /**
  -     * Method setInitializedHostContext
  +     * Set an Initialized HostContext
        *
        *
  -     * @param hostContext
  +     * @param hostContext The host context
        *
        */
       public void setInitializedHostContext( AltrmiHostContext hostContext )
  @@ -67,10 +67,10 @@
        *  for each and every such PublishedName
        *
        *
  -     * @param publishedServiceName
  -     * @param altrmiAuthentication
  -     * @return
  -     * @throws AltrmiConnectionException
  +     * @param publishedServiceName The published service name
  +     * @param altrmiAuthentication An Authentication
  +     * @return The object
  +     * @throws AltrmiConnectionException if a proble during connection
        */
       public Object lookup( String publishedServiceName, AltrmiAuthentication altrmiAuthentication )
           throws AltrmiConnectionException
  @@ -103,10 +103,10 @@
           }
   
           LookupReply lr = (LookupReply)ar;
  -        DefaultProxyHelper baseObj = new DefaultProxyHelper( this,
  -                                                             mHostContext.getClientInvocationHandler(),
  -                                                             publishedServiceName, "Main",
  -                                                             lr.getReferenceID(), mSession );
  +        DefaultProxyHelper baseObj = new DefaultProxyHelper(
  +                this, mHostContext.getClientInvocationHandler(),
  +                publishedServiceName, "Main",
  +                lr.getReferenceID(), mSession );
           Object retVal = getInstance( modifiedPublishedName, "Main", baseObj, isBeanOnly() );
   
           baseObj.registerImplObject( retVal );
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>