|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.tranche.commons.DebuggableThread
org.tranche.clc.TrancheServerCommandLineClient
public class TrancheServerCommandLineClient
This is a simple command line client that can be used with any TrancheServer implementation. The abstraction lets you control either a remote or local implementation through the same interface.
The DistributedFileSystemCommandLineClient class is headless. You can run it from any command prompt. It is primarily tested on Windows and Linux.
This class handles launching the appropriate client (e.g. remote connection, local file system, etc.).
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
protected java.util.Map<java.lang.String,TrancheServerCommandLineClientItem> |
items
|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TrancheServerCommandLineClient(TrancheServer dfs,
java.io.InputStream in,
java.io.PrintStream out)
The basic constructor for the command line client. |
|
| Method Summary | |
|---|---|
void |
addItem(TrancheServerCommandLineClientItem dfsclci)
Adds a new command line command to this client. |
TrancheServerCommandLineClientItem |
getItem(java.lang.String item)
|
int |
getMaxLineLength()
Retrieve maximum characters per line. |
boolean |
isRun()
Return true if this object is running; false otherwise. |
void |
run()
This is a command line client that is designed to manipulate any implementation of TrancheServer. |
void |
setMaxLineLength(int length)
Set the maximum characters allowed per line. |
void |
setRun(boolean run)
Set if this object is runnablble. |
Server |
startServer(int port,
boolean secure)
|
| Methods inherited from class org.tranche.commons.DebuggableThread |
|---|
debugErr, debugErr, debugOut, isDebug, setDebug |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.Map<java.lang.String,TrancheServerCommandLineClientItem> items
| Constructor Detail |
|---|
public TrancheServerCommandLineClient(TrancheServer dfs,
java.io.InputStream in,
java.io.PrintStream out)
The basic constructor for the command line client. It assumes that there is an implementation of TrancheServer to control, an input stream for commands, and an outputstream for results.
dfs - The DistributedFileSystem implementation that will be manipulated by this code.in - the input source for text commandsout - The output where text is sent.| Method Detail |
|---|
public int getMaxLineLength()
public void setMaxLineLength(int length)
public TrancheServerCommandLineClientItem getItem(java.lang.String item)
item -
public void addItem(TrancheServerCommandLineClientItem dfsclci)
dfsclci - the command line item to add
public Server startServer(int port,
boolean secure)
port - secure - public void run()
This is a command line client that is designed to manipulate any implementation of TrancheServer.
This class is also extensible, allowing custom keywords and actions to be plugged in by sub-classes.
run in interface java.lang.Runnablerun in class java.lang.Threadpublic void setRun(boolean run)
run - the flag for runningpublic boolean isRun()
true if the flag for running is enabled;
false otherwise
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||