Package hudson
Class TcpSlaveAgentListener.PingAgentProtocol
- java.lang.Object
-
- jenkins.AgentProtocol
-
- hudson.TcpSlaveAgentListener.PingAgentProtocol
-
- All Implemented Interfaces:
ExtensionPoint
- Enclosing class:
- TcpSlaveAgentListener
@Extension @Symbol("ping") public static class TcpSlaveAgentListener.PingAgentProtocol extends AgentProtocol
This extension provides a Ping protocol that allows people to verify that theTcpSlaveAgentListeneris alive. We also use this to wake the acceptor thread on termination.- Since:
- 1.653
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description PingAgentProtocol()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanconnect(Socket socket)StringgetDisplayName()Returns the human readable protocol display name.StringgetName()Protocol name.voidhandle(Socket socket)Called by the connection handling thread to execute the protocol.booleanisRequired()Allow essentialAgentProtocolimplementations (basicallyTcpSlaveAgentListener.PingAgentProtocol) to be always enabled.-
Methods inherited from class jenkins.AgentProtocol
all, isDeprecated, isOptIn, of
-
-
-
-
Method Detail
-
isRequired
public boolean isRequired()
Description copied from class:AgentProtocolAllow essentialAgentProtocolimplementations (basicallyTcpSlaveAgentListener.PingAgentProtocol) to be always enabled.- Overrides:
isRequiredin classAgentProtocol- Returns:
trueif the protocol can never be disabled.
-
getName
public String getName()
Description copied from class:AgentProtocolProtocol name. This is a short string that consists of printable ASCII chars. Sent by the client to select the protocol.- Specified by:
getNamein classAgentProtocol- Returns:
- null to be disabled. This is useful for avoiding getting used until the protocol is properly configured.
-
getDisplayName
public String getDisplayName()
Description copied from class:AgentProtocolReturns the human readable protocol display name.- Overrides:
getDisplayNamein classAgentProtocol- Returns:
- the human readable protocol display name.
-
handle
public void handle(Socket socket) throws IOException, InterruptedException
Description copied from class:AgentProtocolCalled by the connection handling thread to execute the protocol.- Specified by:
handlein classAgentProtocol- Throws:
IOExceptionInterruptedException
-
connect
public boolean connect(Socket socket) throws IOException
- Throws:
IOException
-
-