net.larsan.urd.cmd
Class CmdEvent

java.lang.Object
  |
  +--net.larsan.urd.cmd.CmdEvent

public class CmdEvent
extends java.lang.Object

The command event is thrown by the command reader. Listeners should implement the CmdEventListener.

Version:
Alpha-0.1 / 2002-10-06 21:37
Author:
Lars J. Nilsson

Field Summary
static int HELP
          Help command, print a help message to screen.
static int INFO
          List service info command
static int KILL
          Kill command, immediate shutdown.
static int LIST
          List service command
static int SHUTDOWN
          Shutdown frameowrk command
static int START
          Start service command
static int STOP
          Stop service command
static int THREADS
          List all threads
 
Constructor Summary
CmdEvent(int type, CmdWriter writer)
          Create an event.
CmdEvent(int type, CmdWriter writer, java.lang.String[] args)
          Create an event with a type and arguments.
 
Method Summary
 java.lang.String[] getArguments()
          Get event arguments.
 int getType()
          Get event type.
 CmdWriter getWriter()
          Get the source writer of this event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KILL

public static final int KILL
Kill command, immediate shutdown.

See Also:
Constant Field Values

HELP

public static final int HELP
Help command, print a help message to screen.

See Also:
Constant Field Values

START

public static final int START
Start service command

See Also:
Constant Field Values

STOP

public static final int STOP
Stop service command

See Also:
Constant Field Values

LIST

public static final int LIST
List service command

See Also:
Constant Field Values

SHUTDOWN

public static final int SHUTDOWN
Shutdown frameowrk command

See Also:
Constant Field Values

INFO

public static final int INFO
List service info command

See Also:
Constant Field Values

THREADS

public static final int THREADS
List all threads

See Also:
Constant Field Values
Constructor Detail

CmdEvent

public CmdEvent(int type,
                CmdWriter writer,
                java.lang.String[] args)
Create an event with a type and arguments.

Parameters:
type - Event type, static identifiers in this class
args - Event arguments, may be null

CmdEvent

public CmdEvent(int type,
                CmdWriter writer)
Create an event.

Parameters:
type - Event type, static identifiers in this class
Method Detail

getType

public int getType()
Get event type.


getArguments

public java.lang.String[] getArguments()
Get event arguments.

Returns:
The event arguments, or null if none where used

getWriter

public CmdWriter getWriter()
Get the source writer of this event.