summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/SelectorHandler.java
blob: 8c139e6030be75d07c0bf8d5254d0f4d40a349a1 (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
// **********************************************************************
//
// Copyright (c) 2003-2008 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;

abstract class SelectorHandler
{
    abstract public java.nio.channels.SelectableChannel fd();

    //
    // In Java, it's possible that the transceiver reads more data
    // than what was really asked. If this is the case, hasMoreData()
    // returns true and the handler read() method should be called 
    // again (without doing a select()). This is handled by the 
    // Selector class (it adds the handler to a separate list of handlers
    // if this method returns true.)
    //
    abstract public boolean hasMoreData();

    //
    // The _key data member are only for use by the Selector.
    //
    protected java.nio.channels.SelectionKey _key;
    protected SocketStatus _pendingStatus;
};