com.sun.sgs.io
Interface Connection

All Known Implementing Classes:
SocketConnection

public interface Connection

Represents a connection for data communication, independent of the QoS properties of the connection's transport or protocol. An associated ConnectionListener is notified of asynchronous events on the connection.


Method Summary
 void close()
          Asynchronously closes this connection, freeing any resources in use.
 void sendBytes(byte[] message)
          Asynchronously sends data on this connection.
 

Method Detail

sendBytes

void sendBytes(byte[] message)
               throws IOException
Asynchronously sends data on this connection.

The specified byte array must not be modified after invoking this method; if the byte array is modified, then this method may have unpredictable results.

Parameters:
message - the message data to send
Throws:
IOException - if there was a synchronous problem sending the message

close

void close()
           throws IOException
Asynchronously closes this connection, freeing any resources in use. The connection should not be considered closed until disconnected is invoked on the listener.

Throws:
IOException - if there was a synchronous problem closing the connection

Project Darkstar, Version 0.9.11.1
2013-07-29 21:44:10

Copyright © 2007-2013 Sun Microsystems, Inc. All rights reserved