ostore.network
Class PingStage

java.lang.Object
  |
  +--ostore.network.PingStage
All Implemented Interfaces:
EventHandlerIF

public class PingStage
extends Object
implements EventHandlerIF

Allows a SandStorm stage to ping a machine by hostname and not block. Enqueue a PingReq and wait for a PingSuccess or PingFailure in response.

Version:
$Id: PingStage.java,v 1.2 2002/11/18 23:39:38 srhea Exp $
Author:
Sean C. Rhea

Nested Class Summary
protected static class PingStage.Alarm
           
static class PingStage.PingFailure
           
static class PingStage.PingReq
           
static class PingStage.PingSuccess
           
static class PingStage.TestHarness
           
 
Field Summary
protected  SinkIF sink
           
protected  Set timeouts
           
protected  ssTimer timer
           
 
Constructor Summary
PingStage()
           
 
Method Summary
 void destroy()
           
protected  void enqueue(SinkIF sink, QueueElementIF item)
           
protected  void error(PingStage.PingReq req)
           
 void handleEvent(QueueElementIF item)
           
 void handleEvents(QueueElementIF[] element_array)
           
 void init(ConfigDataIF config)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeouts

protected Set timeouts

timer

protected ssTimer timer

sink

protected SinkIF sink
Constructor Detail

PingStage

public PingStage()
Method Detail

init

public void init(ConfigDataIF config)
          throws Exception
Specified by:
init in interface EventHandlerIF
Exception

destroy

public void destroy()
Specified by:
destroy in interface EventHandlerIF

handleEvents

public void handleEvents(QueueElementIF[] element_array)
                  throws EventHandlerException
Specified by:
handleEvents in interface EventHandlerIF
EventHandlerException

error

protected void error(PingStage.PingReq req)

handleEvent

public void handleEvent(QueueElementIF item)
                 throws EventHandlerException
Specified by:
handleEvent in interface EventHandlerIF
EventHandlerException

enqueue

protected void enqueue(SinkIF sink,
                       QueueElementIF item)