public static enum PaymentChannelCloseException.CloseReason extends 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 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
|
Modifier and Type | Method and Description |
---|---|
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.
|
public static final PaymentChannelCloseException.CloseReason NO_ACCEPTABLE_VERSION
public static final PaymentChannelCloseException.CloseReason TIME_WINDOW_TOO_LARGE
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 PaymentChannelCloseException.CloseReason[] values()
for (PaymentChannelCloseException.CloseReason c : PaymentChannelCloseException.CloseReason.values()) System.out.println(c);
public static PaymentChannelCloseException.CloseReason valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant
with the specified nameNullPointerException
- if the argument is nullCopyright © 2014. All rights reserved.