net.sourceforge.jpcap.client
Class CaptureConsole

java.lang.Object
  extended bynet.ultrametrics.console.TestConsole
      extended bynet.sourceforge.jpcap.client.CaptureConsole
All Implemented Interfaces:
com.fooware.util.CommandLineable

public class CaptureConsole
extends net.ultrametrics.console.TestConsole

Text console for controlling packet capture.


Constructor Summary
CaptureConsole(CaptureTool captureTool)
          Construct a new capture console.
 
Method Summary
 java.lang.String command_capture(java.lang.String[] args)
          Capture packets.
 java.lang.String command_clear(java.lang.String[] args)
          Clear the packet view frame.
 java.lang.String command_device(java.lang.String[] args)
          Set the device name.
 java.lang.String command_filter(java.lang.String[] args)
          Set the filter expression.
 java.lang.String command_hclear(java.lang.String[] args)
          Clear the history buffer.
protected  java.lang.String command_help(java.util.Collection suppressed)
          Generate help for commands specific to this console.
 java.lang.String command_history(java.lang.String[] args)
          Show the history buffer contents.
 java.lang.String command_hsize(java.lang.String[] args)
          Resize the history buffer.
 java.lang.String command_mode(java.lang.String[] args)
          Set the capture mode.
 java.lang.String command_snaplen(java.lang.String[] args)
          Set the capture data length.
 java.lang.String command_status()
          show the status.
 java.lang.String command_timeout(java.lang.String[] args)
          Set the capture timeout in ms.
 java.lang.String command_ui(java.lang.String[] args)
          Toggle the ui.
 java.lang.String doCommand(java.lang.String command, java.lang.String[] args)
          Command processor.
static void main(java.lang.String[] args)
          Tester.
 
Methods inherited from class net.ultrametrics.console.TestConsole
command_exec, command_exit, command_gc, command_halt, command_itrace, command_lload, command_memory, command_mtrace, command_properties
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CaptureConsole

public CaptureConsole(CaptureTool captureTool)
Construct a new capture console.

Parameters:
captureTool - the capture tool service handle.
Method Detail

doCommand

public java.lang.String doCommand(java.lang.String command,
                                  java.lang.String[] args)
Command processor. Handles commands specific to packet capture. Invokes parent to handle commands inherited from other consoles.

Parameters:
command - the command to execute.
args - optional and required arguments to the provided command.

command_capture

public java.lang.String command_capture(java.lang.String[] args)
Capture packets.


command_clear

public java.lang.String command_clear(java.lang.String[] args)
Clear the packet view frame.


command_device

public java.lang.String command_device(java.lang.String[] args)
Set the device name.


command_filter

public java.lang.String command_filter(java.lang.String[] args)
Set the filter expression.


command_hclear

public java.lang.String command_hclear(java.lang.String[] args)
Clear the history buffer.


command_history

public java.lang.String command_history(java.lang.String[] args)
Show the history buffer contents.


command_hsize

public java.lang.String command_hsize(java.lang.String[] args)
Resize the history buffer.


command_mode

public java.lang.String command_mode(java.lang.String[] args)
Set the capture mode.


command_snaplen

public java.lang.String command_snaplen(java.lang.String[] args)
Set the capture data length.


command_status

public java.lang.String command_status()
show the status.


command_timeout

public java.lang.String command_timeout(java.lang.String[] args)
Set the capture timeout in ms.


command_ui

public java.lang.String command_ui(java.lang.String[] args)
Toggle the ui.


command_help

protected java.lang.String command_help(java.util.Collection suppressed)
Generate help for commands specific to this console. Invoke parent to give help on commands inherited from other consoles.

Parameters:
suppressed - a collection of commands handled by child consoles.

main

public static void main(java.lang.String[] args)
Tester.