Package jline.cli
Class LineClient
java.lang.Object
org.java_websocket.WebSocketAdapter
org.java_websocket.AbstractWebSocket
org.java_websocket.client.WebSocketClient
jline.cli.LineClient
- All Implemented Interfaces:
Runnable
,org.java_websocket.WebSocket
,org.java_websocket.WebSocketListener
public class LineClient
extends org.java_websocket.client.WebSocketClient
LineClient 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
Fields inherited from class org.java_websocket.client.WebSocketClient
uri
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
The main method, which serves as the entry point for the program.void
void
void
void
onOpen
(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, setSocketFactory
Methods inherited from class org.java_websocket.AbstractWebSocket
getConnectionLostTimeout, isReuseAddr, isTcpNoDelay, setConnectionLostTimeout, setReuseAddr, setTcpNoDelay, startConnectionLostTimer, stopConnectionLostTimer
Methods 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
-
LineClient
Constructs a new LineClient 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.
-
onOpen
public void onOpen(org.java_websocket.handshake.ServerHandshake handshakedata) - Specified by:
onOpen
in classorg.java_websocket.client.WebSocketClient
-
onMessage
- Specified by:
onMessage
in classorg.java_websocket.client.WebSocketClient
-
onClose
- Specified by:
onClose
in classorg.java_websocket.client.WebSocketClient
-
onError
- Specified by:
onError
in classorg.java_websocket.client.WebSocketClient
-