Service Management Framework
Release 3.1

com.ibm.osg.smf
Class SMFConsole

java.lang.Object
  |
  +--com.ibm.osg.smf.SMFConsole
All Implemented Interfaces:
java.lang.Runnable

public class SMFConsole
extends java.lang.Object
implements java.lang.Runnable

This class starts SMF with a console for development use. SMFConsole provides a printStackTrace method to print Exceptions and their nested Exceptions.


Constructor Summary
SMFConsole(SMF smf, int port, java.lang.String[] args)
          Constructor for SMFConsole.
SMFConsole(SMF smf, java.lang.String[] args)
          Constructor for SMFConsole.
 
Method Summary
 void console(java.lang.String[] args)
          Command Line Interface for SMF.
 java.lang.String getInput()
          Reads a string from standard input until user hits the Enter key.
 java.io.BufferedReader getReader()
          Return the current input BufferedReader
 boolean getUseSocketStream()
           
 java.io.PrintWriter getWriter()
          Return the current output PrintWriter
static void main(java.lang.String[] args)
          main method for SMFConsole.
 void run()
          Begin doing the active part of the class' code.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMFConsole

public SMFConsole(SMF smf,
                  java.lang.String[] args)
Constructor for SMFConsole. It creates a service tracker to track CommandProvider registrations. The console InputStream is set to System.in and the console PrintStream is set to System.out.
Parameters:
smf - - an instance of an smf framework
args - - any arguments passed on the command line when SMFLauncher is started.

SMFConsole

public SMFConsole(SMF smf,
                  int port,
                  java.lang.String[] args)
Constructor for SMFConsole. It creates a service tracker to track CommandProvider registrations. The console InputStream is set to System.in and the console PrintStream is set to System.out.
Parameters:
smf - - an instance of an smf framework
args - - any arguments passed on the command line when SMFLauncher is started.
Method Detail

main

public static void main(java.lang.String[] args)
main method for SMFConsole. This method is here for legacy purposes. It kicks off SMFLauncher with the -console option.

getWriter

public java.io.PrintWriter getWriter()
Return the current output PrintWriter
Returns:
The currently active PrintWriter

getReader

public java.io.BufferedReader getReader()
Return the current input BufferedReader
Returns:
The currently active BufferedReader

getUseSocketStream

public boolean getUseSocketStream()

run

public void run()
Begin doing the active part of the class' code.
Specified by:
run in interface java.lang.Runnable

console

public void console(java.lang.String[] args)
Command Line Interface for SMF. The method processes the initial commands and then reads and processes commands from the console InputStream. Command output is written to the console PrintStream. The method will loop reading commands from the console InputStream until end-of-file is reached. This method will then return.
Parameters:
args - Initial set of commands to execute.

getInput

public java.lang.String getInput()
Reads a string from standard input until user hits the Enter key.
Returns:
The string read from the standard input without the newline character.

Service Management Framework
Release 3.1

Licensed Materials - Property of IBM. (C) Copyright IBM Corp. 2000, 2002 All Rights Reserved. IBM is a registered trademark of IBM Corp.