cc.youchain.protocol.websocket.WebSocketListener Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of core Show documentation
Show all versions of core Show documentation
YOUChain Common library in JAVA.
package cc.youchain.protocol.websocket;
import java.io.IOException;
/**
* A listener used to notify about about new WebSocket messages.
*/
public interface WebSocketListener {
/**
* Called when a new WebSocket message is delivered.
*
* @param message new WebSocket message
* @throws IOException thrown if an observer failed to process the message
*/
void onMessage(String message) throws IOException;
void onError(Exception e);
void onClose();
}