public final class TcpSlaveAgentListener extends Thread
Aside from the HTTP endpoint, Jenkins runs TcpSlaveAgentListener that listens on a TCP socket.
Historically this was used for inbound connection from slave agents (hence the name), but over time
it was extended and made generic, so that multiple protocols of different purposes can co-exist on the
same socket.
This class accepts the socket, then after a short handshaking, it dispatches to appropriate
AgentProtocols.
AgentProtocol| Modifier and Type | Class and Description |
|---|---|
static class |
TcpSlaveAgentListener.ConnectionFromCurrentPeer
Connection terminated because we are reconnected from the current peer.
|
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static String |
CLI_HOST_NAME
Host name that we advertise the CLI client to connect to.
|
static Integer |
CLI_PORT
Port number that we advertise the CLI client to connect to.
|
int |
configuredPort |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TcpSlaveAgentListener(int port) |
| Modifier and Type | Method and Description |
|---|---|
int |
getPort()
Gets the TCP port number in which we are listening.
|
void |
run() |
void |
shutdown()
Initiates the shuts down of the listener.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic final int configuredPort
public static String CLI_HOST_NAME
public static Integer CLI_PORT
getPort()public TcpSlaveAgentListener(int port)
throws IOException
port - Use 0 to choose a random port.IOExceptionCopyright © 2019. All rights reserved.