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 com.barchart.udt.SocketUDT;
011 import com.barchart.udt.TypeUDT;
012
013 /**
014 * UDT channel role type, or kind.
015 * <p>
016 * {@link TypeUDT} means stream (byte oriented) vs datagram (message oriented).
017 * <p>
018 * {@link KindUDT} gives distinction between server vs client vs peer.
019 */
020 public enum KindUDT {
021
022 /**
023 * Server mode: listens and accepts connections; generates
024 * {@link #CONNECTOR} as a result of {@link SocketUDT#accept()}
025 *
026 * @see ServerSocketChannelUDT
027 */
028 ACCEPTOR, //
029
030 /**
031 * Client mode: channel which initiates connections to servers; options are
032 * user-provided.
033 * <p>
034 * Server mode: channel which is a result of accept(); inherits options from
035 * parent {@link #ACCEPTOR}.
036 *
037 * @see SocketChannelUDT
038 */
039 CONNECTOR, //
040
041 /**
042 * Rendezvous mode: symmetric peer channel on each side of the connection.
043 *
044 * @see RendezvousChannelUDT
045 */
046 RENDEZVOUS, //
047
048 }