code stringlengths 23 201k | docstring stringlengths 17 96.2k | func_name stringlengths 0 235 | language stringclasses 1
value | repo stringlengths 8 72 | path stringlengths 11 317 | url stringlengths 57 377 | license stringclasses 7
values |
|---|---|---|---|---|---|---|---|
@Override
public void run() {
int ch;
try {
while (!interrupted() && (ch = localInput.read()) != -1) {
remoteOutput.write(ch);
remoteOutput.flush();
}
} catch (IOException... | This is a utility class providing a reader/writer capability required by the
weatherTelnet, rexec, rshell, and rlogin example programs. The only point of
the class is to hold the static method readWrite which spawns a reader thread
and a writer thread. The reader thread reads from a local input source
(presumably stdin... | run | java | alibaba/arthas | client/src/main/java/com/taobao/arthas/client/IOUtil.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/com/taobao/arthas/client/IOUtil.java | Apache-2.0 |
@Override
public void run() {
try {
InputStreamReader reader = new InputStreamReader(remoteInput);
while (true) {
int singleChar = reader.read();
if (singleChar == -1) {
break;... | This is a utility class providing a reader/writer capability required by the
weatherTelnet, rexec, rshell, and rlogin example programs. The only point of
the class is to hold the static method readWrite which spawns a reader thread
and a writer thread. The reader thread reads from a local input source
(presumably stdin... | run | java | alibaba/arthas | client/src/main/java/com/taobao/arthas/client/IOUtil.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/com/taobao/arthas/client/IOUtil.java | Apache-2.0 |
public void open() throws SocketException
{
_socket_ = _socketFactory_.createDatagramSocket();
_socket_.setSoTimeout(_timeout_);
_isOpen_ = true;
} | Opens a DatagramSocket on the local host at the first available port.
Also sets the timeout on the socket to the default timeout set
by {@link #setDefaultTimeout setDefaultTimeout() }.
<p>
_isOpen_ is set to true after calling this method and _socket_
is set to the newly opened socket.
@exception SocketException If t... | open | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void open(int port) throws SocketException
{
_socket_ = _socketFactory_.createDatagramSocket(port);
_socket_.setSoTimeout(_timeout_);
_isOpen_ = true;
} | Opens a DatagramSocket on the local host at a specified port.
Also sets the timeout on the socket to the default timeout set
by {@link #setDefaultTimeout setDefaultTimeout() }.
<p>
_isOpen_ is set to true after calling this method and _socket_
is set to the newly opened socket.
@param port The port to use for the soc... | open | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void open(int port, InetAddress laddr) throws SocketException
{
_socket_ = _socketFactory_.createDatagramSocket(port, laddr);
_socket_.setSoTimeout(_timeout_);
_isOpen_ = true;
} | Opens a DatagramSocket at the specified address on the local host
at a specified port.
Also sets the timeout on the socket to the default timeout set
by {@link #setDefaultTimeout setDefaultTimeout() }.
<p>
_isOpen_ is set to true after calling this method and _socket_
is set to the newly opened socket.
@param port Th... | open | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void close()
{
if (_socket_ != null) {
_socket_.close();
}
_socket_ = null;
_isOpen_ = false;
} | Closes the DatagramSocket used for the connection.
You should call this method after you've finished using the class
instance and also before you call {@link #open open() }
again. _isOpen_ is set to false and _socket_ is set to null.
If you call this method when the client socket is not open,
a NullPointerException ... | close | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public boolean isOpen()
{
return _isOpen_;
} | Returns true if the client has a currently open socket.
@return True if the client has a curerntly open socket, false otherwise.
* | isOpen | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void setDefaultTimeout(int timeout)
{
_timeout_ = timeout;
} | Set the default timeout in milliseconds to use when opening a socket.
After a call to open, the timeout for the socket is set using this value.
This method should be used prior to a call to {@link #open open()}
and should not be confused with {@link #setSoTimeout setSoTimeout()}
which operates on the currently open soc... | setDefaultTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public int getDefaultTimeout()
{
return _timeout_;
} | Returns the default timeout in milliseconds that is used when
opening a socket.
@return The default timeout in milliseconds that is used when
opening a socket.
* | getDefaultTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void setSoTimeout(int timeout) throws SocketException
{
_socket_.setSoTimeout(timeout);
} | Set the timeout in milliseconds of a currently open connection.
Only call this method after a connection has been opened
by {@link #open open()}.
@param timeout The timeout in milliseconds to use for the currently
open datagram socket connection.
@throws SocketException if an error setting the timeout... | setSoTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public int getSoTimeout() throws SocketException
{
return _socket_.getSoTimeout();
} | Returns the timeout in milliseconds of the currently opened socket.
If you call this method when the client socket is not open,
a NullPointerException is thrown.
@return The timeout in milliseconds of the currently opened socket.
@throws SocketException if an error getting the timeout
* | getSoTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public int getLocalPort()
{
return _socket_.getLocalPort();
} | Returns the port number of the open socket on the local host used
for the connection. If you call this method when the client socket
is not open, a NullPointerException is thrown.
@return The port number of the open socket on the local host used
for the connection.
* | getLocalPort | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public InetAddress getLocalAddress()
{
return _socket_.getLocalAddress();
} | Returns the local address to which the client's socket is bound.
If you call this method when the client socket is not open, a
NullPointerException is thrown.
@return The local address to which the client's socket is bound.
* | getLocalAddress | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void setDatagramSocketFactory(DatagramSocketFactory factory)
{
if (factory == null) {
_socketFactory_ = __DEFAULT_SOCKET_FACTORY;
} else {
_socketFactory_ = factory;
}
} | Sets the DatagramSocketFactory used by the DatagramSocketClient
to open DatagramSockets. If the factory value is null, then a default
factory is used (only do this to reset the factory after having
previously altered it).
@param factory The new DatagramSocketFactory the DatagramSocketClient
should use.
* | setDatagramSocketFactory | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public String getCharsetName() {
return charset.name();
} | Gets the charset name.
@return the charset name.
@since 3.3
TODO Will be deprecated once the code requires Java 1.6 as a mininmum | getCharsetName | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public Charset getCharset() {
return charset;
} | Gets the charset.
@return the charset.
@since 3.3 | getCharset | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
public void setCharset(Charset charset) {
this.charset = charset;
} | Sets the charset.
@param charset the charset.
@since 3.3 | setCharset | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DatagramSocketClient.java | Apache-2.0 |
@Override
public DatagramSocket createDatagramSocket() throws SocketException
{
return new DatagramSocket();
} | Creates a DatagramSocket on the local host at the first available port.
@return a new DatagramSocket
@exception SocketException If the socket could not be created.
* | createDatagramSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | Apache-2.0 |
@Override
public DatagramSocket createDatagramSocket(int port) throws SocketException
{
return new DatagramSocket(port);
} | Creates a DatagramSocket on the local host at a specified port.
@param port The port to use for the socket.
@return a new DatagramSocket
@exception SocketException If the socket could not be created.
* | createDatagramSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | Apache-2.0 |
@Override
public DatagramSocket createDatagramSocket(int port, InetAddress laddr)
throws SocketException
{
return new DatagramSocket(port, laddr);
} | Creates a DatagramSocket at the specified address on the local host
at a specified port.
@param port The port to use for the socket.
@param laddr The local address to use.
@return a new DatagramSocket
@exception SocketException If the socket could not be created.
* | createDatagramSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultDatagramSocketFactory.java | Apache-2.0 |
@Override
public Socket createSocket() throws IOException
{
if (connProxy != null)
{
return new Socket(connProxy);
}
return new Socket();
} | Creates an unconnected Socket.
@return A new unconnected Socket.
@exception IOException If an I/O error occurs while creating the Socket.
@since 3.2 | createSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
@Override
public Socket createSocket(String host, int port)
throws UnknownHostException, IOException
{
if (connProxy != null)
{
Socket s = new Socket(connProxy);
s.connect(new InetSocketAddress(host, port));
return s;
}
return new Socket(ho... | Creates a Socket connected to the given host and port.
@param host The hostname to connect to.
@param port The port to connect to.
@return A Socket connected to the given host and port.
@exception UnknownHostException If the hostname cannot be resolved.
@exception IOException If an I/O error occurs while creating the... | createSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
@Override
public Socket createSocket(InetAddress address, int port)
throws IOException
{
if (connProxy != null)
{
Socket s = new Socket(connProxy);
s.connect(new InetSocketAddress(address, port));
return s;
}
return new Socket(address, port... | Creates a Socket connected to the given host and port.
@param address The address of the host to connect to.
@param port The port to connect to.
@return A Socket connected to the given host and port.
@exception IOException If an I/O error occurs while creating the Socket.
* | createSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
@Override
public Socket createSocket(String host, int port,
InetAddress localAddr, int localPort)
throws UnknownHostException, IOException
{
if (connProxy != null)
{
Socket s = new Socket(connProxy);
s.bind(new InetSocketAddress(localAdd... | Creates a Socket connected to the given host and port and
originating from the specified local address and port.
@param host The hostname to connect to.
@param port The port to connect to.
@param localAddr The local address to use.
@param localPort The local port to use.
@return A Socket connected to the given host ... | createSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
@Override
public Socket createSocket(InetAddress address, int port,
InetAddress localAddr, int localPort)
throws IOException
{
if (connProxy != null)
{
Socket s = new Socket(connProxy);
s.bind(new InetSocketAddress(localAddr, localPort))... | Creates a Socket connected to the given host and port and
originating from the specified local address and port.
@param address The address of the host to connect to.
@param port The port to connect to.
@param localAddr The local address to use.
@param localPort The local port to use.
@return A Socket connected to t... | createSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
public ServerSocket createServerSocket(int port) throws IOException
{
return new ServerSocket(port);
} | Creates a ServerSocket bound to a specified port. A port
of 0 will create the ServerSocket on a system-determined free port.
@param port The port on which to listen, or 0 to use any free port.
@return A ServerSocket that will listen on a specified port.
@exception IOException If an I/O error occurs while creating
... | createServerSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
public ServerSocket createServerSocket(int port, int backlog)
throws IOException
{
return new ServerSocket(port, backlog);
} | Creates a ServerSocket bound to a specified port with a given
maximum queue length for incoming connections. A port of 0 will
create the ServerSocket on a system-determined free port.
@param port The port on which to listen, or 0 to use any free port.
@param backlog The maximum length of the queue for incoming conn... | createServerSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
public ServerSocket createServerSocket(int port, int backlog,
InetAddress bindAddr)
throws IOException
{
return new ServerSocket(port, backlog, bindAddr);
} | Creates a ServerSocket bound to a specified port on a given local
address with a given maximum queue length for incoming connections.
A port of 0 will
create the ServerSocket on a system-determined free port.
@param port The port on which to listen, or 0 to use any free port.
@param backlog The maximum length of the... | createServerSocket | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/DefaultSocketFactory.java | Apache-2.0 |
@Override
public void protocolCommandSent(ProtocolCommandEvent event)
{
if (__directionMarker) {
__writer.print("> ");
}
if (__nologin) {
String cmd = event.getCommand();
if ("PASS".equalsIgnoreCase(cmd) || "USER".equalsIgnoreCase(cmd)) {
... | Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
@param writer where to write the commands and responses
@param suppressLogin if {@code true}, only print command name for login
@param eolMarker if non-zero, add a marker just before the E... | protocolCommandSent | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/PrintCommandListener.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/PrintCommandListener.java | Apache-2.0 |
private String getPrintableString(String msg){
if (__eolMarker == 0) {
return msg;
}
int pos = msg.indexOf(SocketClient.NETASCII_EOL);
if (pos > 0) {
return msg.substring(0, pos) +
__eolMarker +
msg.substring(pos);
}... | Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
@param writer where to write the commands and responses
@param suppressLogin if {@code true}, only print command name for login
@param eolMarker if non-zero, add a marker just before the E... | getPrintableString | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/PrintCommandListener.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/PrintCommandListener.java | Apache-2.0 |
@Override
public void protocolReplyReceived(ProtocolCommandEvent event)
{
if (__directionMarker) {
__writer.print("< ");
}
__writer.print(event.getMessage());
__writer.flush();
} | Create an instance which optionally suppresses login command text
and indicates where the EOL starts with the specified character.
@param writer where to write the commands and responses
@param suppressLogin if {@code true}, only print command name for login
@param eolMarker if non-zero, add a marker just before the E... | protocolReplyReceived | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/PrintCommandListener.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/PrintCommandListener.java | Apache-2.0 |
public String getCommand()
{
return __command;
} | Returns the string representation of the command type sent (e.g., "STAT"
or "GET"). If the ProtocolCommandEvent is a reply event, then null
is returned.
@return The string representation of the command type sent, or null
if this is a reply event.
* | getCommand | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | Apache-2.0 |
public int getReplyCode()
{
return __replyCode;
} | Returns the reply code of the received server reply. Undefined if
this is not a reply event.
@return The reply code of the received server reply. Undefined if
not a reply event.
* | getReplyCode | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | Apache-2.0 |
public boolean isCommand()
{
return __isCommand;
} | Returns true if the ProtocolCommandEvent was generated as a result
of sending a command.
@return true If the ProtocolCommandEvent was generated as a result
of sending a command. False otherwise.
* | isCommand | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | Apache-2.0 |
public boolean isReply()
{
return !isCommand();
} | Returns true if the ProtocolCommandEvent was generated as a result
of receiving a reply.
@return true If the ProtocolCommandEvent was generated as a result
of receiving a reply. False otherwise.
* | isReply | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | Apache-2.0 |
public String getMessage()
{
return __message;
} | Returns the entire message sent to or received from the server.
Includes the line terminator.
@return The entire message sent to or received from the server.
* | getMessage | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandEvent.java | Apache-2.0 |
public void addProtocolCommandListener(ProtocolCommandListener listener)
{
__listeners.addListener(listener);
} | Adds a ProtocolCommandListener.
@param listener The ProtocolCommandListener to add.
* | addProtocolCommandListener | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | Apache-2.0 |
public void removeProtocolCommandListener(ProtocolCommandListener listener)
{
__listeners.removeListener(listener);
} | Removes a ProtocolCommandListener.
@param listener The ProtocolCommandListener to remove.
* | removeProtocolCommandListener | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | Apache-2.0 |
public int getListenerCount()
{
return __listeners.getListenerCount();
} | Returns the number of ProtocolCommandListeners currently registered.
@return The number of ProtocolCommandListeners currently registered.
* | getListenerCount | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/ProtocolCommandSupport.java | Apache-2.0 |
protected void _connectAction_() throws IOException
{
_socket_.setSoTimeout(_timeout_);
_input_ = _socket_.getInputStream();
_output_ = _socket_.getOutputStream();
} | Because there are so many connect() methods, the _connectAction_()
method is provided as a means of performing some action immediately
after establishing a connection, rather than reimplementing all
of the connect() methods. The last action performed by every
connect() method after opening a socket is to call this met... | _connectAction_ | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(InetAddress host, int port)
throws SocketException, IOException
{
_hostname_ = null;
_socket_ = _socketFactory_.createSocket();
if (receiveBufferSize != -1) {
_socket_.setReceiveBufferSize(receiveBufferSize);
}
if (sendBufferSize != -1) {
... | Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param host The remote host.
@param port The port to connect to on... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(String hostname, int port)
throws SocketException, IOException
{
connect(InetAddress.getByName(hostname), port);
_hostname_ = hostname;
} | Opens a Socket connected to a remote host at the specified port and
originating from the current host at a system assigned port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param hostname The name of the remote host.
@param port The port ... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(InetAddress host, int port,
InetAddress localAddr, int localPort)
throws SocketException, IOException
{
_hostname_ = null;
_socket_ = _socketFactory_.createSocket();
if (receiveBufferSize != -1) {
_socket_.setReceiveBufferSize(recei... | Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param host The remote host.
@param port The port to connect to on the r... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(String hostname, int port,
InetAddress localAddr, int localPort)
throws SocketException, IOException
{
connect(InetAddress.getByName(hostname), port, localAddr, localPort);
_hostname_ = hostname;
} | Opens a Socket connected to a remote host at the specified port and
originating from the specified local address and port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param hostname The name of the remote host.
@param port The port to con... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(InetAddress host) throws SocketException, IOException
{
_hostname_ = null;
connect(host, _defaultPort_);
} | Opens a Socket connected to a remote host at the current default port
and originating from the current host at a system assigned port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param host The remote host.
@exception SocketException If th... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void connect(String hostname) throws SocketException, IOException
{
connect(hostname, _defaultPort_);
_hostname_ = hostname;
} | Opens a Socket connected to a remote host at the current default
port and originating from the current host at a system assigned port.
Before returning, {@link #_connectAction_ _connectAction_() }
is called to perform connection initialization actions.
<p>
@param hostname The name of the remote host.
@exception Socke... | connect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void disconnect() throws IOException
{
closeQuietly(_socket_);
closeQuietly(_input_);
closeQuietly(_output_);
_socket_ = null;
_hostname_ = null;
_input_ = null;
_output_ = null;
} | Disconnects the socket connection.
You should call this method after you've finished using the class
instance and also before you call
{@link #connect connect() }
again. _isConnected_ is set to false, _socket_ is set to null,
_input_ is set to null, and _output_ is set to null.
<p>
@exception IOException If there is ... | disconnect | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
private void closeQuietly(Socket socket) {
if (socket != null){
try {
socket.close();
} catch (IOException e) {
// Ignored
}
}
} | Disconnects the socket connection.
You should call this method after you've finished using the class
instance and also before you call
{@link #connect connect() }
again. _isConnected_ is set to false, _socket_ is set to null,
_input_ is set to null, and _output_ is set to null.
<p>
@exception IOException If there is ... | closeQuietly | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
private void closeQuietly(Closeable close){
if (close != null){
try {
close.close();
} catch (IOException e) {
// Ignored
}
}
} | Disconnects the socket connection.
You should call this method after you've finished using the class
instance and also before you call
{@link #connect connect() }
again. _isConnected_ is set to false, _socket_ is set to null,
_input_ is set to null, and _output_ is set to null.
<p>
@exception IOException If there is ... | closeQuietly | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public boolean isConnected()
{
if (_socket_ == null) {
return false;
}
return _socket_.isConnected();
} | Returns true if the client is currently connected to a server.
<p>
Delegates to {@link Socket#isConnected()}
@return True if the client is currently connected to a server,
false otherwise. | isConnected | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setDefaultPort(int port)
{
_defaultPort_ = port;
} | Sets the default port the SocketClient should connect to when a port
is not specified. The {@link #_defaultPort_ _defaultPort_ }
variable stores this value. If never set, the default port is equal
to zero.
<p>
@param port The default port to set. | setDefaultPort | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getDefaultPort()
{
return _defaultPort_;
} | Returns the current value of the default port (stored in
{@link #_defaultPort_ _defaultPort_ }).
<p>
@return The current value of the default port. | getDefaultPort | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setDefaultTimeout(int timeout)
{
_timeout_ = timeout;
} | Set the default timeout in milliseconds to use when opening a socket.
This value is only used previous to a call to
{@link #connect connect()}
and should not be confused with {@link #setSoTimeout setSoTimeout()}
which operates on an the currently opened socket. _timeout_ contains
the new timeout value.
<p>
@param time... | setDefaultTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getDefaultTimeout()
{
return _timeout_;
} | Returns the default timeout in milliseconds that is used when
opening a socket.
<p>
@return The default timeout in milliseconds that is used when
opening a socket. | getDefaultTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setSoTimeout(int timeout) throws SocketException
{
_socket_.setSoTimeout(timeout);
} | Set the timeout in milliseconds of a currently open connection.
Only call this method after a connection has been opened
by {@link #connect connect()}.
<p>
To set the initial timeout, use {@link #setDefaultTimeout(int)} instead.
@param timeout The timeout in milliseconds to use for the currently
open ... | setSoTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setSendBufferSize(int size) throws SocketException {
sendBufferSize = size;
} | Set the underlying socket send buffer size.
<p>
@param size The size of the buffer in bytes.
@throws SocketException never thrown, but subclasses might want to do so
@since 2.0 | setSendBufferSize | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected int getSendBufferSize(){
return sendBufferSize;
} | Get the current sendBuffer size
@return the size, or -1 if not initialised
@since 3.0 | getSendBufferSize | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setReceiveBufferSize(int size) throws SocketException {
receiveBufferSize = size;
} | Sets the underlying socket receive buffer size.
<p>
@param size The size of the buffer in bytes.
@throws SocketException never (but subclasses may wish to do so)
@since 2.0 | setReceiveBufferSize | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected int getReceiveBufferSize(){
return receiveBufferSize;
} | Get the current receivedBuffer size
@return the size, or -1 if not initialised
@since 3.0 | getReceiveBufferSize | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getSoTimeout() throws SocketException
{
return _socket_.getSoTimeout();
} | Returns the timeout in milliseconds of the currently opened socket.
<p>
@return The timeout in milliseconds of the currently opened socket.
@exception SocketException If the operation fails.
@throws NullPointerException if the socket is not currently open | getSoTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setTcpNoDelay(boolean on) throws SocketException
{
_socket_.setTcpNoDelay(on);
} | Enables or disables the Nagle's algorithm (TCP_NODELAY) on the
currently opened socket.
<p>
@param on True if Nagle's algorithm is to be enabled, false if not.
@exception SocketException If the operation fails.
@throws NullPointerException if the socket is not currently open | setTcpNoDelay | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public boolean getTcpNoDelay() throws SocketException
{
return _socket_.getTcpNoDelay();
} | Returns true if Nagle's algorithm is enabled on the currently opened
socket.
<p>
@return True if Nagle's algorithm is enabled on the currently opened
socket, false otherwise.
@exception SocketException If the operation fails.
@throws NullPointerException if the socket is not currently open | getTcpNoDelay | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public boolean getKeepAlive() throws SocketException {
return _socket_.getKeepAlive();
} | Returns the current value of the SO_KEEPALIVE flag on the currently opened socket.
Delegates to {@link Socket#getKeepAlive()}
@return True if SO_KEEPALIVE is enabled.
@throws SocketException if there is a problem with the socket
@throws NullPointerException if the socket is not currently open
@since 2.2 | getKeepAlive | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setSoLinger(boolean on, int val) throws SocketException
{
_socket_.setSoLinger(on, val);
} | Sets the SO_LINGER timeout on the currently opened socket.
<p>
@param on True if linger is to be enabled, false if not.
@param val The linger timeout (in hundredths of a second?)
@exception SocketException If the operation fails.
@throws NullPointerException if the socket is not currently open | setSoLinger | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getSoLinger() throws SocketException
{
return _socket_.getSoLinger();
} | Returns the current SO_LINGER timeout of the currently opened socket.
<p>
@return The current SO_LINGER timeout. If SO_LINGER is disabled returns
-1.
@exception SocketException If the operation fails.
@throws NullPointerException if the socket is not currently open | getSoLinger | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getLocalPort()
{
return _socket_.getLocalPort();
} | Returns the port number of the open socket on the local host used
for the connection.
Delegates to {@link Socket#getLocalPort()}
<p>
@return The port number of the open socket on the local host used
for the connection.
@throws NullPointerException if the socket is not currently open | getLocalPort | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public InetAddress getLocalAddress()
{
return _socket_.getLocalAddress();
} | Returns the local address to which the client's socket is bound.
Delegates to {@link Socket#getLocalAddress()}
<p>
@return The local address to which the client's socket is bound.
@throws NullPointerException if the socket is not currently open | getLocalAddress | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getRemotePort()
{
return _socket_.getPort();
} | Returns the port number of the remote host to which the client is
connected.
Delegates to {@link Socket#getPort()}
<p>
@return The port number of the remote host to which the client is
connected.
@throws NullPointerException if the socket is not currently open | getRemotePort | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public InetAddress getRemoteAddress()
{
return _socket_.getInetAddress();
} | @return The remote address to which the client is connected.
Delegates to {@link Socket#getInetAddress()}
@throws NullPointerException if the socket is not currently open | getRemoteAddress | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setSocketFactory(SocketFactory factory)
{
if (factory == null) {
_socketFactory_ = __DEFAULT_SOCKET_FACTORY;
} else {
_socketFactory_ = factory;
}
// re-setting the socket factory makes the proxy setting useless,
// so set the field to null... | Sets the SocketFactory used by the SocketClient to open socket
connections. If the factory value is null, then a default
factory is used (only do this to reset the factory after having
previously altered it).
Any proxy setting is discarded.
<p>
@param factory The new SocketFactory the SocketClient should use. | setSocketFactory | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setServerSocketFactory(ServerSocketFactory factory) {
if (factory == null) {
_serverSocketFactory_ = __DEFAULT_SERVER_SOCKET_FACTORY;
} else {
_serverSocketFactory_ = factory;
}
} | Sets the ServerSocketFactory used by the SocketClient to open ServerSocket
connections. If the factory value is null, then a default
factory is used (only do this to reset the factory after having
previously altered it).
<p>
@param factory The new ServerSocketFactory the SocketClient should use.
@since 2.0 | setServerSocketFactory | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setConnectTimeout(int connectTimeout) {
this.connectTimeout = connectTimeout;
} | Sets the connection timeout in milliseconds, which will be passed to the {@link Socket} object's
connect() method.
@param connectTimeout The connection timeout to use (in ms)
@since 2.0 | setConnectTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public int getConnectTimeout() {
return connectTimeout;
} | Get the underlying socket connection timeout.
@return timeout (in ms)
@since 2.0 | getConnectTimeout | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public ServerSocketFactory getServerSocketFactory() {
return _serverSocketFactory_;
} | Get the underlying {@link ServerSocketFactory}
@return The server socket factory
@since 2.2 | getServerSocketFactory | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected void fireReplyReceived(int replyCode, String reply) {
if (getCommandSupport().getListenerCount() > 0) {
getCommandSupport().fireReplyReceived(replyCode, reply);
}
} | If there are any listeners, send them the reply details.
@param replyCode the code extracted from the reply
@param reply the full reply text
@since 3.0 | fireReplyReceived | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected void fireCommandSent(String command, String message) {
if (getCommandSupport().getListenerCount() > 0) {
getCommandSupport().fireCommandSent(command, message);
}
} | If there are any listeners, send them the command details.
@param command the command name
@param message the complete message, including command name
@since 3.0 | fireCommandSent | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected void createCommandSupport(){
__commandSupport = new ProtocolCommandSupport(this);
} | Create the CommandSupport instance if required | createCommandSupport | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
protected ProtocolCommandSupport getCommandSupport() {
return __commandSupport;
} | Subclasses can override this if they need to provide their own
instance field for backwards compatibility.
@return the CommandSupport instance, may be {@code null}
@since 3.0 | getCommandSupport | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setProxy(Proxy proxy) {
setSocketFactory(new DefaultSocketFactory(proxy));
connProxy = proxy;
} | Sets the proxy for use with all the connections.
The proxy is used for connections established after the
call to this method.
@param proxy the new proxy for connections.
@since 3.2 | setProxy | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public Proxy getProxy() {
return connProxy;
} | Gets the proxy for use with all the connections.
@return the current proxy for connections. | getProxy | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
@Deprecated
public String getCharsetName() {
return charset.name();
} | Gets the charset name.
@return the charset.
@since 3.3
@deprecated Since the code now requires Java 1.6 as a mininmum | getCharsetName | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public Charset getCharset() {
return charset;
} | Gets the charset.
@return the charset.
@since 3.3 | getCharset | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
public void setCharset(Charset charset) {
this.charset = charset;
} | Sets the charset.
@param charset the charset.
@since 3.3 | setCharset | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/SocketClient.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/SocketClient.java | Apache-2.0 |
@Override
public String getMessage()
{
return (msg + ": " + optionCode);
} | Gets the error message of ths exception.
<p>
@return the error message.
* | getMessage | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/InvalidTelnetOptionException.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/InvalidTelnetOptionException.java | Apache-2.0 |
boolean _stateIsWill(int option)
{
return ((_options[option] & _WILL_MASK) != 0);
} | Looks for the state of the option.
@return returns true if a will has been acknowledged
@param option - option code to be looked up.
* | _stateIsWill | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _stateIsWont(int option)
{
return !_stateIsWill(option);
} | Looks for the state of the option.
@return returns true if a wont has been acknowledged
@param option - option code to be looked up.
* | _stateIsWont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _stateIsDo(int option)
{
return ((_options[option] & _DO_MASK) != 0);
} | Looks for the state of the option.
@return returns true if a do has been acknowledged
@param option - option code to be looked up.
* | _stateIsDo | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _stateIsDont(int option)
{
return !_stateIsDo(option);
} | Looks for the state of the option.
@return returns true if a dont has been acknowledged
@param option - option code to be looked up.
* | _stateIsDont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _requestedWill(int option)
{
return ((_options[option] & _REQUESTED_WILL_MASK) != 0);
} | Looks for the state of the option.
@return returns true if a will has been reuqested
@param option - option code to be looked up.
* | _requestedWill | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _requestedWont(int option)
{
return !_requestedWill(option);
} | Looks for the state of the option.
@return returns true if a wont has been reuqested
@param option - option code to be looked up.
* | _requestedWont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _requestedDo(int option)
{
return ((_options[option] & _REQUESTED_DO_MASK) != 0);
} | Looks for the state of the option.
@return returns true if a do has been reuqested
@param option - option code to be looked up.
* | _requestedDo | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
boolean _requestedDont(int option)
{
return !_requestedDo(option);
} | Looks for the state of the option.
@return returns true if a dont has been reuqested
@param option - option code to be looked up.
* | _requestedDont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWill(int option) throws IOException
{
_options[option] |= _WILL_MASK;
/* open TelnetOptionHandler functionality (start)*/
if (_requestedWill(option))
{
if (optionHandlers[option] != null)
{
optionHandlers[option].setWill(true);
... | Sets the state of the option.
@param option - option code to be set.
@throws IOException
* | _setWill | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setDo(int option) throws IOException
{
_options[option] |= _DO_MASK;
/* open TelnetOptionHandler functionality (start)*/
if (_requestedDo(option))
{
if (optionHandlers[option] != null)
{
optionHandlers[option].setDo(true);
... | Sets the state of the option.
@param option - option code to be set.
@throws IOException
* | _setDo | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWantWill(int option)
{
_options[option] |= _REQUESTED_WILL_MASK;
} | Sets the state of the option.
@param option - option code to be set.
* | _setWantWill | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWantDo(int option)
{
_options[option] |= _REQUESTED_DO_MASK;
} | Sets the state of the option.
@param option - option code to be set.
* | _setWantDo | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWont(int option)
{
_options[option] &= ~_WILL_MASK;
/* open TelnetOptionHandler functionality (start)*/
if (optionHandlers[option] != null)
{
optionHandlers[option].setWill(false);
}
/* open TelnetOptionHandler functionality (end)*/
} | Sets the state of the option.
@param option - option code to be set.
* | _setWont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setDont(int option)
{
_options[option] &= ~_DO_MASK;
/* open TelnetOptionHandler functionality (start)*/
if (optionHandlers[option] != null)
{
optionHandlers[option].setDo(false);
}
/* open TelnetOptionHandler functionality (end)*/
} | Sets the state of the option.
@param option - option code to be set.
* | _setDont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWantWont(int option)
{
_options[option] &= ~_REQUESTED_WILL_MASK;
} | Sets the state of the option.
@param option - option code to be set.
* | _setWantWont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
void _setWantDont(int option)
{
_options[option] &= ~_REQUESTED_DO_MASK;
} | Sets the state of the option.
@param option - option code to be set.
* | _setWantDont | java | alibaba/arthas | client/src/main/java/org/apache/commons/net/telnet/Telnet.java | https://github.com/alibaba/arthas/blob/master/client/src/main/java/org/apache/commons/net/telnet/Telnet.java | Apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.