ICE 3.4.2
[php5-ice-freebsdport.git] / java / src / IceInternal / Transceiver.java
blob67fb7faa60ae068df1970550480ee1fbb29a4b25
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 package IceInternal;
12 public interface Transceiver
14 java.nio.channels.SelectableChannel fd();
17 // Initialize the transceiver.
19 // Returns the status if the initialize operation.
21 int initialize();
23 void close();
26 // Write data.
28 // Returns true if all the data was written, false otherwise.
30 boolean write(Buffer buf);
33 // Read data.
35 // Returns true if all the requested data was read, false otherwise.
37 // NOTE: In Java, read() returns a boolean in moreData to indicate
38 // whether the transceiver has read more data than requested.
39 // If moreData is true, read should be called again without
40 // calling select on the FD.
42 boolean read(Buffer buf, Ice.BooleanHolder moreData);
44 String type();
45 String toString();
46 Ice.ConnectionInfo getInfo();
47 void checkSendSize(Buffer buf, int messageSizeMax);