com.sun.sgs.transport
Interface Transport


public interface Transport

I/O transport. A transport object handles incoming connection requests for a specific transport type. A Transport must have a public constructor that takes the following argument:


Method Summary
 void accept(ConnectionHandler handler)
          Start accepting connections.
 Delivery getDelivery()
          Returns the delivery guarantee for the transport.
 TransportDescriptor getDescriptor()
          Returns the descriptor for this transport.
 void shutdown()
          Shutdown the transport.
 

Method Detail

getDescriptor

TransportDescriptor getDescriptor()
Returns the descriptor for this transport. Multiple calls to this method may return the same object.

Returns:
the descriptor for this transport

getDelivery

Delivery getDelivery()
Returns the delivery guarantee for the transport.

Returns:
the delivery guarantee for the transport

accept

void accept(ConnectionHandler handler)
            throws IOException
Start accepting connections. The transport will invoke the specified handler's newConnection method when a connection is received. Once accept has been called, subsequent invocations will throw an IllegalStateException. If shutdown() has been called this method will throw an IllegalStateException.

Parameters:
handler - the connection handler
Throws:
IllegalStateException - if the transport has been shutdown or accept has been called.
IOException - if an I/O error occurs

shutdown

void shutdown()
Shutdown the transport. The actions of this method are implementation dependent, but typically involve closing open network connections, releasing system resources, etc.. All shutdown activity is synchronous with this call. Once this method is called, subsequent calls to shutdown will have no affect.


RedDwarf, Version 0.10.1
2010-03-14 10:56:12

Copyright © 2010 The RedDwarf Authors. All rights reserved
Copyright © 2007-2010 Sun Microsystems, Inc. All rights reserved