public static enum PaymentChannelCloseException.CloseReason extends java.lang.Enum<PaymentChannelCloseException.CloseReason>
Enum Constant and Description |
---|
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 the client when the server requested we lock up an unacceptably high value
|
TIME_WINDOW_UNACCEPTABLE
Generated by the client when time window the suggested by the server is unacceptable
|
UPDATE_PAYMENT_FAILED
The server failed processing an UpdatePayment message
|
Modifier and Type | Method and Description |
---|---|
static PaymentChannelCloseException.CloseReason |
valueOf(java.lang.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.
|
public static final PaymentChannelCloseException.CloseReason NO_ACCEPTABLE_VERSION
public static final PaymentChannelCloseException.CloseReason TIME_WINDOW_UNACCEPTABLE
public static final PaymentChannelCloseException.CloseReason SERVER_REQUESTED_TOO_MUCH_VALUE
public static final PaymentChannelCloseException.CloseReason CHANNEL_EXHAUSTED
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.
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)
public static final PaymentChannelCloseException.CloseReason REMOTE_SENT_ERROR
public static final PaymentChannelCloseException.CloseReason REMOTE_SENT_INVALID_MESSAGE
public static final PaymentChannelCloseException.CloseReason CONNECTION_CLOSED
public static final PaymentChannelCloseException.CloseReason UPDATE_PAYMENT_FAILED
public static PaymentChannelCloseException.CloseReason[] values()
for (PaymentChannelCloseException.CloseReason c : PaymentChannelCloseException.CloseReason.values()) System.out.println(c);
public static PaymentChannelCloseException.CloseReason valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null