Appia Documentation

net.sf.appia.core.events.channel
Class PeriodicTimer

java.lang.Object
  extended by net.sf.appia.core.Event
      extended by net.sf.appia.core.events.channel.ChannelEvent
          extended by net.sf.appia.core.events.channel.PeriodicTimer
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
FifoTimer, FragTimer, GossipServerTimer, NakFifoTimer, RetrieveAddressTimer, SuspectTimer, SuspectTimer, TcpTimer, ThroughputDebugTimer, UniformTimer, UniformTimer

public class PeriodicTimer
extends ChannelEvent
implements java.lang.Cloneable

Defines a PeriodicTimer class.

Version:
1.0
Author:
Alexandre Pinto

Field Summary
protected  long period
          The period between notifications, in milliseconds.
 java.lang.String timerID
          The Timer unique Identification.
 
Fields inherited from class net.sf.appia.core.Event
DEFAULT_PRIORITY, MAX_PRIORITY, MIN_PRIORITY
 
Constructor Summary
PeriodicTimer()
          Creates a uninitialized PeriodicTimer Event.
PeriodicTimer(java.lang.String timerID, long period, Channel channel, int dir, Session source, int qualifier)
          Creates a initialized PeriodicTimer Event.
 
Method Summary
 Event cloneEvent()
          Redefenition of Event.cloneEvent.
 long getPeriod()
          Gets the time between the periodic notifications.
 void setPeriod(long period)
          Sets the time between the periodic notifications, in milliseconds.
 
Methods inherited from class net.sf.appia.core.events.channel.ChannelEvent
getQualifierMode, setQualifierMode
 
Methods inherited from class net.sf.appia.core.Event
asyncGo, currentSession, debug, getChannel, getDir, getPriority, getSchedulerData, getSource, getSourceSession, go, init, isAccepted, popSession, setChannel, setDir, setPriority, setSchedulerData, setSource, setSourceSession
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timerID

public java.lang.String timerID
The Timer unique Identification.


period

protected long period
The period between notifications, in milliseconds.

Constructor Detail

PeriodicTimer

public PeriodicTimer()
Creates a uninitialized PeriodicTimer Event.


PeriodicTimer

public PeriodicTimer(java.lang.String timerID,
                     long period,
                     Channel channel,
                     int dir,
                     Session source,
                     int qualifier)
              throws AppiaEventException,
                     AppiaException
Creates a initialized PeriodicTimer Event.

Parameters:
timerID - the timer ID
period - the period of the timer, in milliseconds.
channel - the channel
dir - the direction of the timer.
source - the session that created the event
qualifier - the event qualifier
Throws:
AppiaEventException
AppiaException - if the period is negative.
Method Detail

setPeriod

public void setPeriod(long period)
               throws AppiaException
Sets the time between the periodic notifications, in milliseconds.

Parameters:
period - The period in milliseconds.
Throws:
AppiaException

getPeriod

public long getPeriod()
Gets the time between the periodic notifications.

Returns:
period The period in milliseconds.

cloneEvent

public Event cloneEvent()
                 throws java.lang.CloneNotSupportedException
Redefenition of Event.cloneEvent.

Overrides:
cloneEvent in class ChannelEvent
Returns:
the clone
Throws:
java.lang.CloneNotSupportedException - as the possible result of calling Event.cloneEvent()

Appia Documentation

COPYRIGHT 2006-2009, University of Lisbon and INESC-ID
For updates and related information please see Appia Home Page
Send questions, sugestions or remarks to the appia-users mailing list