com.twitter.common.thrift
Enum ThriftConnectionFactory.TransportType

java.lang.Object
  extended by java.lang.Enum<ThriftConnectionFactory.TransportType>
      extended by com.twitter.common.thrift.ThriftConnectionFactory.TransportType
All Implemented Interfaces:
Serializable, Comparable<ThriftConnectionFactory.TransportType>
Enclosing class:
ThriftConnectionFactory

public static enum ThriftConnectionFactory.TransportType
extends Enum<ThriftConnectionFactory.TransportType>


Enum Constant Summary
BLOCKING
           
FRAMED
           
NONBLOCKING
           
 
Method Summary
static ThriftConnectionFactory.TransportType get(boolean framedTransport, boolean nonblocking)
          Async clients implicitly use a framed transport, requiring the server they connect to to do the same.
static ThriftConnectionFactory.TransportType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ThriftConnectionFactory.TransportType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

BLOCKING

public static final ThriftConnectionFactory.TransportType BLOCKING

FRAMED

public static final ThriftConnectionFactory.TransportType FRAMED

NONBLOCKING

public static final ThriftConnectionFactory.TransportType NONBLOCKING
Method Detail

values

public static ThriftConnectionFactory.TransportType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (ThriftConnectionFactory.TransportType c : ThriftConnectionFactory.TransportType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ThriftConnectionFactory.TransportType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

get

public static ThriftConnectionFactory.TransportType get(boolean framedTransport,
                                                        boolean nonblocking)
Async clients implicitly use a framed transport, requiring the server they connect to to do the same. This prevents specifying a nonblocking client without a framed transport, since that is not compatible with thrift and would simply cause the client to blow up when making a request. Instead, you must explicitly say useFramedTransport(true) for any buildAsync().