com.ccg.net
Class TransportNull

java.lang.Object
  extended by com.ccg.net.TransportNull
All Implemented Interfaces:
Transport
Direct Known Subclasses:
TransportStreams

public class TransportNull
extends Object
implements Transport

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);
   }
 }
 

Since:
1.0
Version:
$Revision: 1.3 $
Author:
$Author: pkb $ *see [class][#method]|Text

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

TransportNull

public TransportNull()
Initializes object to... It performs the following tasks:

Since:
1.0 #see [class][#meth]|Text
Method Detail

send

public void send(Serializable object)
          throws IOException
Method to send a message to other end of transport. Assuming your 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.

Specified by:
send in interface Transport
Parameters:
object - Object to send
Throws:
IOException - If there is a problem sending the object (maybe the underlying transportation system has failed).
Since:
1.0
See Also:
addReceiver(com.ccg.net.Receiver)

receive

public Object receive()
               throws IOException,
                      ClassNotFoundException,
                      OptionalDataException
Method to receive a message from the other end of transport. Assuming your 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.

Specified by:
receive in interface Transport
Returns:
Always returns null in this implementation (no real receiver at the other end).
Throws:
IOException - 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.
Since:
1.0
See Also:
send(java.io.Serializable)

addReceiver

public void addReceiver(Receiver r)
Allows any 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.

Parameters:
r - Receiver object that wants to be notified of all objects received by this transport.
Since:
1.0
See Also:
send(java.io.Serializable)

distribute

protected void distribute(Object msg)
One line summary... Describe...

Parameters:
arg1 - arg1-describe
arg2 - arg2-describe
Throws:
exc - Why thrown
Since:
1.0 #see [class][#meth]|Text


Copyright 1998-1998-2006 null. All Rights Reserved.