Package jline.cli
Class LineWebSocketClient
java.lang.Object
org.java_websocket.WebSocketAdapter
org.java_websocket.AbstractWebSocket
org.java_websocket.client.WebSocketClient
jline.cli.LineWebSocketClient
- All Implemented Interfaces:
Runnable,org.java_websocket.WebSocket,org.java_websocket.WebSocketListener
public class LineWebSocketClient
extends org.java_websocket.client.WebSocketClient
LineWebSocketClient is a WebSocket client used to communicate with the LINE Solver server.
It extends the WebSocketClient class and provides methods for connecting to the server
and sending messages.
-
Field Summary
FieldsFields inherited from class org.java_websocket.client.WebSocketClient
uri -
Constructor Summary
ConstructorsConstructorDescriptionLineWebSocketClient(URI serverURI, String msg) Constructs a new LineWebSocketClient instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic voidThe main method, which serves as the entry point for the program.voidvoidvoidvoidonOpen(org.java_websocket.handshake.ServerHandshake handshakedata) Methods inherited from class org.java_websocket.client.WebSocketClient
addHeader, clearHeaders, close, close, close, closeBlocking, closeConnection, connect, connectBlocking, connectBlocking, getAttachment, getConnection, getConnections, getDraft, getLocalSocketAddress, getLocalSocketAddress, getReadyState, getRemoteSocketAddress, getRemoteSocketAddress, getResourceDescriptor, getSocket, getSSLSession, getURI, hasBufferedData, hasSSLSupport, isClosed, isClosing, isFlushAndClose, isOpen, onCloseInitiated, onClosing, onMessage, onSetSSLParameters, onWebsocketClose, onWebsocketCloseInitiated, onWebsocketClosing, onWebsocketError, onWebsocketMessage, onWebsocketMessage, onWebsocketOpen, onWriteDemand, reconnect, reconnectBlocking, removeHeader, run, send, send, send, sendFragmentedFrame, sendFrame, sendFrame, sendPing, setAttachment, setDnsResolver, setProxy, setSocket, setSocketFactoryMethods inherited from class org.java_websocket.AbstractWebSocket
getConnectionLostTimeout, isReuseAddr, isTcpNoDelay, setConnectionLostTimeout, setReuseAddr, setTcpNoDelay, startConnectionLostTimer, stopConnectionLostTimerMethods inherited from class org.java_websocket.WebSocketAdapter
onPreparePing, onWebsocketHandshakeReceivedAsClient, onWebsocketHandshakeReceivedAsServer, onWebsocketHandshakeSentAsClient, onWebsocketPing, onWebsocketPong
-
Field Details
-
message
The message to be sent to the server.
-
-
Constructor Details
-
LineWebSocketClient
Constructs a new LineWebSocketClient instance.- Parameters:
serverURI- the URI of the server to connect to.msg- the message to be sent to the server.
-
-
Method Details
-
main
public static void main(String[] args) throws URISyntaxException, org.apache.commons.cli.ParseException The main method, which serves as the entry point for the program. It processes command-line arguments and establishes a connection with the server.- Parameters:
args- command-line arguments specifying the server IP, port, and other options.- Throws:
URISyntaxException- if the URI syntax is incorrect.org.apache.commons.cli.ParseException- if there is an error in parsing the command-line arguments.
-
onClose
- Specified by:
onClosein classorg.java_websocket.client.WebSocketClient
-
onError
- Specified by:
onErrorin classorg.java_websocket.client.WebSocketClient
-
onMessage
- Specified by:
onMessagein classorg.java_websocket.client.WebSocketClient
-
onOpen
public void onOpen(org.java_websocket.handshake.ServerHandshake handshakedata) - Specified by:
onOpenin classorg.java_websocket.client.WebSocketClient
-