summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Transceiver.java
blob: 4379340014a2dedc2e665dfcdde751ce668d0cca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// **********************************************************************
//
// Copyright (c) 2003-2010 ZeroC, Inc. All rights reserved.
//
// This copy of Ice is licensed to you under the terms described in the
// ICE_LICENSE file included in this distribution.
//
// **********************************************************************

package IceInternal;

public interface Transceiver
{
    java.nio.channels.SelectableChannel fd();

    //
    // Initialize the transceiver.
    //
    // Returns the status if the initialize operation.
    //
    int initialize();

    void close();

    //
    // Write data.
    //
    // Returns true if all the data was written, false otherwise.
    //
    boolean write(Buffer buf);

    //
    // Read data.
    //
    // Returns true if all the requested data was read, false otherwise.
    //
    // NOTE: In Java, read() returns a boolean in moreData to indicate
    //       whether the transceiver has read more data than requested.
    //       If moreData is true, read should be called again without
    //       calling select on the FD.
    //
    boolean read(Buffer buf, Ice.BooleanHolder moreData);

    String type();
    String toString();
    Ice.ConnectionInfo getInfo();
    void checkSendSize(Buffer buf, int messageSizeMax);
}