net.jxta.impl.shell
Class ShellInputPipe
java.lang.Object
|
+--net.jxta.impl.shell.ShellInputPipe
- public class ShellInputPipe
- extends java.lang.Object
- implements net.jxta.pipe.InputPipe, java.lang.Runnable
This class implements the default JXTA Shell InputPipe.
Strings entered at the keyboard are received by the Shell like
if they were messages received from a regular InputPipe.
Method Summary |
void |
close()
|
net.jxta.endpoint.Message |
poll(int time)
Poll for a message from the pipe |
void |
run()
Our run method is responsible for reading from the console and filling
the queue with messages. |
net.jxta.endpoint.Message |
waitForMessage()
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
ShellInputPipe
public ShellInputPipe(net.jxta.peergroup.PeerGroup group,
ShellConsole cons)
run
public void run()
- Our run method is responsible for reading from the console and filling
the queue with messages.
- Specified by:
- run in interface java.lang.Runnable
waitForMessage
public net.jxta.endpoint.Message waitForMessage()
throws java.lang.InterruptedException
- Specified by:
- waitForMessage in interface net.jxta.pipe.InputPipe
poll
public net.jxta.endpoint.Message poll(int time)
throws java.lang.InterruptedException
- Poll for a message from the pipe
- Specified by:
- poll in interface net.jxta.pipe.InputPipe
- Returns:
- Message message received
close
public void close()
- Specified by:
- close in interface net.jxta.pipe.InputPipe