Top Description Fields Constructors Methods
javax.websocket

public final Class SendResult

extends Object
Class Inheritance

The result of asynchronously sending a web socket message. A SendResult is either ok indicating there was no problem, or is not OK in which case there was a problem and it carries an exception to indicate what the problem was.
Author
dannycoward

Field Summary

Modifier and TypeField and Description
private final Throwable
private final boolean

Constructor Summary

AccessConstructor and Description
public
SendResult(Throwable
the exception causing a send failure.
exception
)

Construct a SendResult carrying an exception.

public
SendResult()

Construct a SendResult signifying a successful send carrying no exception.

Method Summary

Modifier and TypeMethod and Description
public Throwable

Returns:

the problem or null if the send was successful.
getException
()

The problem sending the message.

public boolean

Returns:

whether the send was successful or not.
isOK
()

Determines if this result is ok or not.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

exceptionback to summary
private final Throwable exception
isOKback to summary
private final boolean isOK

Constructor Detail

SendResultback to summary
public SendResult(Throwable exception)

Construct a SendResult carrying an exception.

Parameters
exception:Throwable

the exception causing a send failure.

SendResultback to summary
public SendResult()

Construct a SendResult signifying a successful send carrying no exception.

Method Detail

getExceptionback to summary
public Throwable getException()

The problem sending the message.

Returns:Throwable

the problem or null if the send was successful.

isOKback to summary
public boolean isOK()

Determines if this result is ok or not.

Returns:boolean

whether the send was successful or not.