cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From un...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/components/flow ContinuationsManagerImpl.java
Date Sun, 22 Feb 2004 19:02:16 GMT
unico       2004/02/22 11:02:16

  Modified:    src/java/org/apache/cocoon/components/flow
                        ContinuationsManagerImpl.java
  Log:
  get the command sink from the service manager instead of from the context
  
  Revision  Changes    Path
  1.12      +10 -13    cocoon-2.2/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java
  
  Index: ContinuationsManagerImpl.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/flow/ContinuationsManagerImpl.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- ContinuationsManagerImpl.java	20 Feb 2004 18:53:46 -0000	1.11
  +++ ContinuationsManagerImpl.java	22 Feb 2004 19:02:16 -0000	1.12
  @@ -58,10 +58,10 @@
   
   import org.apache.avalon.framework.configuration.Configurable;
   import org.apache.avalon.framework.configuration.Configuration;
  -import org.apache.avalon.framework.context.Context;
  -import org.apache.avalon.framework.context.ContextException;
  -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.event.Queue;
   import org.apache.excalibur.event.Sink;
   import org.apache.excalibur.event.command.RepeatedCommand;
  @@ -82,7 +82,7 @@
    */
   public class ContinuationsManagerImpl
           extends AbstractLogEnabled
  -        implements ContinuationsManager, Configurable, Contextualizable {
  +        implements ContinuationsManager, Serviceable, Configurable {
   
       static final int CONTINUATION_ID_LENGTH = 20;
       static final String EXPIRE_CONTINUATIONS = "expire-continuations";
  @@ -129,6 +129,10 @@
           bytes = new byte[CONTINUATION_ID_LENGTH];
       }
   
  +    public void service(ServiceManager manager) throws ServiceException {
  +        m_commandSink = (Sink) manager.lookup(Queue.ROLE);
  +    }
  +
       public void configure(Configuration config) {
           defaultTimeToLive = config.getAttributeAsInteger("time-to-live", (3600 * 1000));
           Configuration expireConf = config.getChild("expirations-check");
  @@ -371,14 +375,6 @@
           }
       }
   
  -    /**
  -     * Get the command sink so that we can be notified of changes
  -     */
  -    public void contextualize(Context context) throws ContextException {
  -        m_commandSink = (Sink) context.get(Queue.ROLE);
  -    }
  -
  -
       final class ContinuationInterrupt implements RepeatedCommand {
           private final long m_interval;
           private final long m_initialDelay;
  @@ -422,4 +418,5 @@
               expireContinuations();
           }
       }
  +
   }
  
  
  

Mime
View raw message