next up previous contents
Next: MessageListener Up: Interfaces Previous: Interfaces

Transport

Interface Transport (JavaGroups.Transport) looks as follows:

        public interface Transport {    
            public void   Send(Message msg)     throws Exception;
            public Object Receive(long timeout) throws Exception;
        }

It defines a very small subset of the functionality of a channel, essentially only the methods for sending and receiving messages. There are a number of classes that implement Transport, among others Channel. Many building blocks (see 3.4) require nothing else than a bare-bone facility to send and receive messages; therefore the Transport interface was created. It increases the genericness and portability of building blocks: being so simple, the Transport interface can easily be ported to a different toolkit, without requiring any modifications to building blocks.




1999-12-13