001    /**
002     * Copyright (C) 2009-2013 Barchart, Inc. <http://www.barchart.com/>
003     *
004     * All rights reserved. Licensed under the OSI BSD License.
005     *
006     * http://www.opensource.org/licenses/bsd-license.php
007     */
008    package com.barchart.udt.nio;
009    
010    import java.nio.channels.Channel;
011    import java.nio.channels.SelectionKey;
012    
013    import com.barchart.udt.SocketUDT;
014    import com.barchart.udt.TypeUDT;
015    
016    /**
017     * Interface shared by all {@link KindUDT} kinds.
018     */
019    public interface ChannelUDT extends Channel {
020    
021            /**
022             * Was connection request
023             * {@link SocketChannelUDT#connect(java.net.SocketAddress)} acknowledged by
024             * {@link SocketChannelUDT#finishConnect()}?
025             */
026            boolean isConnectFinished();
027    
028            /**
029             * The kind of UDT channel.
030             */
031            KindUDT kindUDT();
032    
033            /**
034             * UDT specific provider which produced this channel.
035             */
036            SelectorProviderUDT providerUDT();
037    
038            /**
039             * Underlying UDT socket.
040             */
041            SocketUDT socketUDT();
042    
043            /**
044             * The type of UDT socket.
045             */
046            TypeUDT typeUDT();
047    
048            /**
049             * Mask of all interest options which are permitted for this channel.
050             * 
051             * @see SelectionKey
052             */
053            int validOps();
054    
055    }