org.ow2.jasmine.jadort.service.action
Class DummyWorkerAction

java.lang.Object
  extended by org.ow2.jasmine.jadort.service.action.AbstractAction
      extended by org.ow2.jasmine.jadort.service.action.WorkerAction
          extended by org.ow2.jasmine.jadort.service.action.DummyWorkerAction

public class DummyWorkerAction
extends WorkerAction

Dummy worker action, only does internal calls.

Author:
Malek Chahine, Remy Bresson, S. Ali Tokmen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.ow2.jasmine.jadort.service.action.WorkerAction
WorkerAction.State
 
Field Summary
static int CRASH_PROBA_PERCENT
           
static int MAX_SLEEP
           
static int MIN_SLEEP
           
 
Constructor Summary
protected DummyWorkerAction(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
           
 
Method Summary
 void activate()
          Activate worker.
 void disable()
          Disable worker.
 WorkerAction.State getState()
           
 void stop()
          Stop worker.
 
Methods inherited from class org.ow2.jasmine.jadort.service.action.WorkerAction
getConstructor, getWorkerAction, newInstance
 
Methods inherited from class org.ow2.jasmine.jadort.service.action.AbstractAction
appendToLog, flushLog
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CRASH_PROBA_PERCENT

public static int CRASH_PROBA_PERCENT

MIN_SLEEP

public static int MIN_SLEEP

MAX_SLEEP

public static int MAX_SLEEP
Constructor Detail

DummyWorkerAction

protected DummyWorkerAction(org.ow2.jasmine.jadort.api.entities.topology.WorkerBean worker)
Method Detail

activate

public void activate()
              throws java.lang.Exception
Description copied from class: WorkerAction
Activate worker. When a worker is active, it always redirects requests to the server that it links to.

Specified by:
activate in class WorkerAction
Throws:
java.lang.Exception

disable

public void disable()
             throws java.lang.Exception
Description copied from class: WorkerAction
Disable worker. When a worker is disabled, it redirects requests to the server that it links to if the client has a valid session on the target server.

To enable a disabled worker, call WorkerAction.activate() .

Specified by:
disable in class WorkerAction
Throws:
java.lang.Exception

stop

public void stop()
          throws java.lang.Exception
Description copied from class: WorkerAction
Stop worker. When a worker is stopped, it never redirects requests to the server that it links to.

Specified by:
stop in class WorkerAction
Throws:
java.lang.Exception

getState

public WorkerAction.State getState()
                            throws java.lang.Exception
Specified by:
getState in class WorkerAction
Returns:
The current worker state.
Throws:
java.lang.Exception


Copyright © 2009 OW2 Consortium. All Rights Reserved.