com.google.bitcoin.protocols.channels
Enum PaymentChannelCloseException.CloseReason

java.lang.Object
  extended by java.lang.Enum<PaymentChannelCloseException.CloseReason>
      extended by com.google.bitcoin.protocols.channels.PaymentChannelCloseException.CloseReason
All Implemented Interfaces:
Serializable, Comparable<PaymentChannelCloseException.CloseReason>
Enclosing class:
PaymentChannelCloseException

public static enum PaymentChannelCloseException.CloseReason
extends Enum<PaymentChannelCloseException.CloseReason>


Enum Constant Summary
CHANNEL_EXHAUSTED
          Generated by the server when the client has used up all the value in the channel.
CLIENT_REQUESTED_CLOSE
          The PaymentChannelClient.settle() method was called or the client sent a CLOSE message.
CONNECTION_CLOSED
          The connection was closed without an ERROR/CLOSE message
NO_ACCEPTABLE_VERSION
          We could not find a version which was mutually acceptable with the client/server
REMOTE_SENT_ERROR
          Remote side sent an ERROR message
REMOTE_SENT_INVALID_MESSAGE
          Remote side sent a message we did not understand
SERVER_REQUESTED_CLOSE
          The PaymentChannelServer.close() method was called or server sent a CLOSE message.
SERVER_REQUESTED_TOO_MUCH_VALUE
          Generated by a client when the server requested we lock up an unacceptably high value
TIME_WINDOW_TOO_LARGE
          Generated by a client when the server attempted to lock in our funds for an unacceptably long time
 
Method Summary
static PaymentChannelCloseException.CloseReason valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PaymentChannelCloseException.CloseReason[] 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

NO_ACCEPTABLE_VERSION

public static final PaymentChannelCloseException.CloseReason NO_ACCEPTABLE_VERSION
We could not find a version which was mutually acceptable with the client/server


TIME_WINDOW_TOO_LARGE

public static final PaymentChannelCloseException.CloseReason TIME_WINDOW_TOO_LARGE
Generated by a client when the server attempted to lock in our funds for an unacceptably long time


SERVER_REQUESTED_TOO_MUCH_VALUE

public static final PaymentChannelCloseException.CloseReason SERVER_REQUESTED_TOO_MUCH_VALUE
Generated by a client when the server requested we lock up an unacceptably high value


CHANNEL_EXHAUSTED

public static final PaymentChannelCloseException.CloseReason CHANNEL_EXHAUSTED
Generated by the server when the client has used up all the value in the channel.


CLIENT_REQUESTED_CLOSE

public static final PaymentChannelCloseException.CloseReason CLIENT_REQUESTED_CLOSE

The PaymentChannelClient.settle() method was called or the client sent a CLOSE message.

As long as the server received the CLOSE message, this means that the channel is settling and the payment transaction (if any) will be broadcast. If the client attempts to open a new connection, a new channel will have to be opened.


SERVER_REQUESTED_CLOSE

public static final PaymentChannelCloseException.CloseReason SERVER_REQUESTED_CLOSE

The PaymentChannelServer.close() method was called or server sent a CLOSE message.

This may occur if the server opts to close the connection for some reason, or automatically if the channel times out (called by StoredPaymentChannelServerStates).

For a client, this usually indicates that we should try again if we need to continue paying (either opening a new channel or continuing with the same one depending on the server's preference)


REMOTE_SENT_ERROR

public static final PaymentChannelCloseException.CloseReason REMOTE_SENT_ERROR
Remote side sent an ERROR message


REMOTE_SENT_INVALID_MESSAGE

public static final PaymentChannelCloseException.CloseReason REMOTE_SENT_INVALID_MESSAGE
Remote side sent a message we did not understand


CONNECTION_CLOSED

public static final PaymentChannelCloseException.CloseReason CONNECTION_CLOSED
The connection was closed without an ERROR/CLOSE message

Method Detail

values

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

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

valueOf

public static PaymentChannelCloseException.CloseReason 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 © 2014. All rights reserved.