|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ccg.net.TransportNull
public class TransportNull
Not ready for prime time - please ignore for now.
class Example {
public void main(String[] args) {
com.ccg.net.TransportNull o = new com.ccg.net.TransportNull();
System.out.println(o);
}
}
| Constructor Summary | |
|---|---|
TransportNull()
Initializes object to... |
|
| Method Summary | |
|---|---|
void |
addReceiver(Receiver r)
Allows any Receiver to view objects this Transport receives. |
protected void |
distribute(Object msg)
One line summary... |
Object |
receive()
Method to receive a message from the other end of transport. |
void |
send(Serializable object)
Method to send a message to other end of transport. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TransportNull()
| Method Detail |
|---|
public void send(Serializable object)
throws IOException
Transport object is connected to
something, you can use this method to send any Serializable object to the other end of the
connection. In this implementation, nothing is done - the message
is ignored - derived classes which allow the actual sending of
messages should override this.
send in interface Transportobject - Object to send
IOException - If there is a problem sending the object (maybe the underlying
transportation system has failed).addReceiver(com.ccg.net.Receiver)
public Object receive()
throws IOException,
ClassNotFoundException,
OptionalDataException
Transport object is connected to
something, you can use this method to read the next Serializable object which the other end of
the connection has sent to you.
This is the "null" implementation (it always returns null). Derived classes may wish to override if they are capable of receiving objects from the other end of their transport connection.
receive in interface TransportIOException - If there is a problem reading/receiving the object (maybe the
underlying transportation system has failed).
OptionalDataException - Problem reading optional data associated with object being
received? (Not sure about this one).
ClassNotFoundException - If the sender sent us a object which we don't have the class
definition for.send(java.io.Serializable)public void addReceiver(Receiver r)
Receiver to view objects this Transport receives.
Any time a Transport object receives a object
from the other end(s) of its connection(s), it notifies all
interested parties about the received object. This method allows
a Receiver object to register itself as a
interested party.
r - Receiver object that wants to be notified of
all objects received by this transport.send(java.io.Serializable)protected void distribute(Object msg)
arg1 - arg1-describearg2 - arg2-describe
exc - Why thrown
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||