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 disable()
          Disable worker.
 void enable()
          Enable worker.
 WorkerAction.State getState()
           
 
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

enable

public void enable()
            throws java.lang.Exception
Description copied from class: WorkerAction
Enable worker. When a worker is enabled, it redirects requests to the target server.

To disable a worker, call WorkerAction.disable() .

Specified by:
enable 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.enable() .

Specified by:
disable 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 © 2010 OW2 Consortium. All Rights Reserved.