|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.limitless.nmc.Client.CommandSender
public class CommandSender
A CommandSender object listens to a source, issues a single command, and then discards everything back until either a close of connection or the result of the command that was sent, which it returns to its caller. The object serializes on the command sending, but not on the command processing--so there can be at most one active sender, even though dozens of messages will flow through.
| Nested Class Summary | |
|---|---|
private class |
CommandSender.Listener
This class sifts through messages looking for a response to a sent message. |
| Field Summary | |
|---|---|
private CommandSender.Listener |
listener
|
(package private) static org.apache.log4j.Logger |
logger
Log4J Logger |
private MessageEvent.Source |
source
|
| Constructor Summary | |
|---|---|
CommandSender(MessageEvent.Source source)
CommandSender requires the source to monitor and send to |
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
java.util.List |
send(java.lang.String command)
This delivers a command and returns the response. |
void |
shutdown()
When you shutdown this object, it severs its connection to the source. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
static org.apache.log4j.Logger logger
private CommandSender.Listener listener
private MessageEvent.Source source
| Constructor Detail |
|---|
public CommandSender(MessageEvent.Source source)
| Method Detail |
|---|
public void shutdown()
public java.util.List send(java.lang.String command)
throws java.lang.IllegalStateException,
SourceUnavailableException
java.lang.IllegalStateException
SourceUnavailableExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||