avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-avalon-cornerstone/apps/overlord/src/java/org/apache/avalon/overlord TimeTriggerFactory.java
Date Wed, 28 Nov 2001 02:37:09 GMT
colus       01/11/27 18:37:09

  Modified:    apps/overlord/src/conf overlord-config.xml
               apps/overlord/src/java/org/apache/avalon/overlord
                        TimeTriggerFactory.java
  Log:
  Create TimeTrigger by "type" attribute.
  Changed name of trigger type to all lowercase.
  
  Revision  Changes    Path
  1.2       +2 -2      jakarta-avalon-cornerstone/apps/overlord/src/conf/overlord-config.xml
  
  Index: overlord-config.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/overlord/src/conf/overlord-config.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- overlord-config.xml	2001/11/25 07:34:00	1.1
  +++ overlord-config.xml	2001/11/28 02:37:09	1.2
  @@ -24,14 +24,14 @@
       <tasks>
         <!--
         <task name="news">
  -        <trigger class="Periodic">
  +        <trigger type="periodic">
             <offset>1000</offset>
             <period>10000</period>
           </trigger>
           <target>news</target>
         </task>
         <task name="weather">
  -        <trigger class="Periodic">
  +        <trigger type="Periodic">
             <offset>1000</offset>
             <period>-1</period>
           </trigger>
  
  
  
  1.2       +4 -4      jakarta-avalon-cornerstone/apps/overlord/src/java/org/apache/avalon/overlord/TimeTriggerFactory.java
  
  Index: TimeTriggerFactory.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-cornerstone/apps/overlord/src/java/org/apache/avalon/overlord/TimeTriggerFactory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TimeTriggerFactory.java	2001/11/25 07:34:01	1.1
  +++ TimeTriggerFactory.java	2001/11/28 02:37:09	1.2
  @@ -28,10 +28,10 @@
       public TimeTrigger create( final Configuration conf )
           throws ConfigurationException
       {
  -        final String clazz = conf.getAttribute( "class" );
  +        final String type = conf.getAttribute( "type" );
   
           TimeTrigger trigger;
  -        if ( "Periodic".equals( clazz ) )
  +        if ( "periodic".equals( type ) )
           {
               final int offset = conf.getChild( "offset", true )
                   .getValueAsInteger( 0 );
  @@ -40,7 +40,7 @@
   
               trigger = new PeriodicTimeTrigger( offset, period );
           }
  -        else if ( "Cron".equals( clazz ) )
  +        else if ( "cron".equals( type ) )
           {
               final int minute = conf.getChild( "minute", true )
                   .getValueAsInteger( -1 );
  @@ -61,7 +61,7 @@
           else
           {
               final String msg = REZ.getString( "overlord.error.trigger.unknown",
  -                                              clazz );
  +                                              type );
               throw new ConfigurationException( msg );
           }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message