com.ccg.net
Class TransportStreams

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

public class TransportStreams
extends TransportNull

Not ready for prime time - please ignore for now.

 class Example {
   public void main(String[] args) {
     com.ccg.net.TransportStreams o = new com.ccg.net.TransportStreams();
          System.out.println(o);
   }
 }
 

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

Constructor Summary
TransportStreams(InputStream in, OutputStream out)
          Initializes object to...
 
Method Summary
 Object receive()
          One line summary...
 void send(Serializable object)
          Method to send a message to other end of transport.
 
Methods inherited from class com.ccg.net.TransportNull
addReceiver, distribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportStreams

public TransportStreams(InputStream in,
                        OutputStream out)
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
Overrides:
send in class TransportNull
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:
TransportNull.addReceiver(com.ccg.net.Receiver)

receive

public Object receive()
               throws IOException,
                      ClassNotFoundException,
                      OptionalDataException
One line summary... Describe...

Specified by:
receive in interface Transport
Overrides:
receive in class TransportNull
Parameters:
arg1 - arg1-describe
arg2 - arg2-describe
Returns:
ret-description
Throws:
exc - Why thrown
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 [class][#meth]|Text
See Also:
TransportNull.send(java.io.Serializable)


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