appia.protocols.fifo
Class FIFOConfigEvent

java.lang.Object
  |
  +--appia.Event
        |
        +--appia.protocols.fifo.FIFOConfigEvent

public class FIFOConfigEvent
extends appia.Event

Class FIFOConfigEvent extends Event and is used for the configuration of FIFO sessions. FifoSession is initialized with default values. The event may redefine all or some of these values.

See Also:
FifoLayer, Event, FifoSession

Constructor Summary
FIFOConfigEvent(appia.Channel c, appia.Direction d, appia.Session source)
          Constructor initializing basic event attributes.
 
Method Summary
 int getNumResends()
          Returns the new number of resends.
 long getPeriod()
          Returns the period.
 int getTimersToResend()
          gets number of timers to resend messages.
 int getWindow()
          Returns the new window size.
 boolean isNumResendsDef()
          Learns if the Number of resends was set.
 boolean isPeriodDef()
          Learns if the period was set
 boolean isTimersToResendDef()
          checks if the number of timers was set
 boolean isWindowDef()
          Learns if the window was set
 void setNumResends(int n)
          Defines the number of resends of a not acknoledged message.
 void setPeriod(long period)
          Defines the minimum number of miliseconds to wait prior to resending a unacknowledged message.
 void setRetries(int n)
          This method just calls setNumResends().
 void setTimersToResend(int nTimers)
          sets the number of periodic timers for resending messages
 void setWindow(int window)
          Defines the maximum number of messages received out of order kept for any peer.
 
Methods inherited from class appia.Event
asyncGo, cloneEvent, currentSession, debug, getChannel, getDirection, getSource, go, init, isAccepted, popSession, setChannel, setDirection, setSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FIFOConfigEvent

public FIFOConfigEvent(appia.Channel c,
                       appia.Direction d,
                       appia.Session source)
                throws appia.AppiaEventException
Constructor initializing basic event attributes. Events created with this constructor do not need to be initialized.

Parameters:
c - The channel where the event will flow
d - The direction the event will flow
source - The session creating the event
See Also:
Channel, Direction, Session
Method Detail

setPeriod

public void setPeriod(long period)
Defines the minimum number of miliseconds to wait prior to resending a unacknowledged message.

Parameters:
period - The interval (in miliseconds) prior to resending a message

isPeriodDef

public boolean isPeriodDef()
Learns if the period was set


getPeriod

public long getPeriod()
Returns the period. The returned value is valid only if isPeriodDef() returns true


setTimersToResend

public void setTimersToResend(int nTimers)
sets the number of periodic timers for resending messages

Parameters:
nTimers - number of timers

isTimersToResendDef

public boolean isTimersToResendDef()
checks if the number of timers was set


getTimersToResend

public int getTimersToResend()
gets number of timers to resend messages. this is valid only if isTimersToResendDef() returns true


setRetries

public void setRetries(int n)
This method just calls setNumResends(). Used for compatibility with other protocols

See Also:
setNumResends(int)

setNumResends

public void setNumResends(int n)
Defines the number of resends of a not acknoledged message.

Parameters:
n - new number of resends

isNumResendsDef

public boolean isNumResendsDef()
Learns if the Number of resends was set.


getNumResends

public int getNumResends()
Returns the new number of resends. The value is only valid if the isNumResends() method returns true

Returns:
number of resends

setWindow

public void setWindow(int window)
Defines the maximum number of messages received out of order kept for any peer.

Parameters:
window - The number of out-of-order messages hold by the session.

isWindowDef

public boolean isWindowDef()
Learns if the window was set


getWindow

public int getWindow()
Returns the new window size. The returned value is valid only if isWindowDef() returns true