com.neeve.link
Enum LnkRequest.State

java.lang.Object
  extended by java.lang.Enum<LnkRequest.State>
      extended by com.neeve.link.LnkRequest.State
All Implemented Interfaces:
Serializable, Comparable<LnkRequest.State>
Enclosing class:
LnkRequest

public static enum LnkRequest.State
extends Enum<LnkRequest.State>

Enumerates the different request states


Enum Constant Summary
ACTIVE
          Indicates that a request object is active and is being used in a request-reply exchange operation.
COMPLETE
          Indicates that the request-reply exchange that a request object was involved in has completed.
CREATED
          Indicates that a request object has just been created but not initialized.
INITIALIZED
          Indicates that a request object has been initialized.
 
Method Summary
static LnkRequest.State valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LnkRequest.State[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CREATED

public static final LnkRequest.State CREATED
Indicates that a request object has just been created but not initialized. A created object is associated with a link sender but is not ready for use with the sender. The request needs to be initialized before used with the sender.


INITIALIZED

public static final LnkRequest.State INITIALIZED
Indicates that a request object has been initialized. An initialized request is ready for use with its associated sender for synchronous or pipelined sends. A request object transitions to this state when initialized using LnkRequest.init(com.neeve.pkt.PktPacket). The request object needs to be in this state before it is passed to the LnkSender.sendSync(com.neeve.link.LnkRequest, int) or the LnkSender.sendPipelined(com.neeve.link.LnkRequest, com.neeve.link.ILnkPeerEndpoint.FlushContext, int) methods.


ACTIVE

public static final LnkRequest.State ACTIVE
Indicates that a request object is active and is being used in a request-reply exchange operation. A request object transitions to this state by LnkSender.sendSync(com.neeve.link.LnkRequest, int) or LnkSender.sendPipelined(com.neeve.link.LnkRequest, com.neeve.link.ILnkPeerEndpoint.FlushContext, int) and remains in this state until the request-reply exchange that it is involved in completes. A request object's state cannot be altered by a user while in this state. The only transition from this state is to COMPLETE and this is done internally by the link sender when the request-reply exchange that it is involved in completes.


COMPLETE

public static final LnkRequest.State COMPLETE
Indicates that the request-reply exchange that a request object was involved in has completed. In this state, the user can reinitialize the request for reuse.

Method Detail

values

public static LnkRequest.State[] 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 (LnkRequest.State c : LnkRequest.State.values())
    System.out.println(c);

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

valueOf

public static LnkRequest.State 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


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.