HoldTimeHelper
Keywords: uk.ac.ic.doc.automed.p2p.directory.HoldTimeHelper class

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## uk.ac.ic.doc.automed.p2p.directory
Class HoldTimeHelper

    java.lang.Object
      uk.ac.ic.doc.automed.p2p.directory.HoldTimeHelper

All Implemented Interfaces:
  uk.ac.ic.doc.automed.util.queue.JobHandler, uk.ac.ic.doc.automed.util.thread.Threadable

    public class HoldTimeHelper

extends java.lang.Object
implements uk.ac.ic.doc.automed.util.thread.Threadable, uk.ac.ic.doc.automed.util.queue.JobHandler

Constructor Summary
`HoldTimeHelper(uk.ac.ic.doc.automed.util.queue.Queue msgQueue, P2PDirectory directoryObj, HelloTimeHelper heHelper)` Creates a new instance of HoldTimeHelper

Method Summary
`void` | `handleAction()` Implements `Theadable` interface.
`void` | `handleJob(uk.ac.ic.doc.automed.util.queue.Job job)` Implement `JobHandler` interface. This method is invoked by every job thread to handle job
`boolean` | `isRunning()`
`void` | `reset()` Reset the hold-time process when necessary
`void` | `runAction()` Implements `Theadable` interface This method acts as the background process at the server to update peer status.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### HoldTimeHelper

    public HoldTimeHelper(uk.ac.ic.doc.automed.util.queue.Queue msgQueue,
                          P2PDirectory directoryObj,
                          HelloTimeHelper heHelper)

  Creates a new instance of HoldTimeHelper

Method Detail

### isRunning

    public boolean isRunning()

### runAction

    public void runAction()
                   throws AutoMedException

  Implements `Theadable` interface This method acts as the background process at the server to update peer
  status. It is invoked at every hold_down and flush interval to check and
  update peer's status appropriately.

  Specified by:
    `runAction` in interface `uk.ac.ic.doc.automed.util.thread.Threadable`
  Throws:
    `AutoMedException`

### reset

    public void reset()

  Reset the hold-time process when necessary

### handleAction

    public void handleAction()

  Implements `Theadable` interface. This method handles exceptions when running as a thread.

  Specified by:
    `handleAction` in interface `uk.ac.ic.doc.automed.util.thread.Threadable`
  Throws:
    `AutoMedException`

### handleJob

    public void handleJob(uk.ac.ic.doc.automed.util.queue.Job job)
                   throws AutoMedException

  Implement `JobHandler` interface.
  This method is invoked by every job thread to handle job

  Specified by:
    `handleJob` in interface `uk.ac.ic.doc.automed.util.queue.JobHandler`
  Throws:
    `AutoMedException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD