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 theTcpSlaveAgentListener
is 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 boolean
connect(Socket socket)
String
getDisplayName()
Returns the human readable protocol display name.String
getName()
Protocol name.void
handle(Socket socket)
Called by the connection handling thread to execute the protocol.boolean
isRequired()
Allow essentialAgentProtocol
implementations (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:AgentProtocol
Allow essentialAgentProtocol
implementations (basicallyTcpSlaveAgentListener.PingAgentProtocol
) to be always enabled.- Overrides:
isRequired
in classAgentProtocol
- Returns:
true
if the protocol can never be disabled.
-
getName
public String getName()
Description copied from class:AgentProtocol
Protocol name. This is a short string that consists of printable ASCII chars. Sent by the client to select the protocol.- Specified by:
getName
in 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:AgentProtocol
Returns the human readable protocol display name.- Overrides:
getDisplayName
in classAgentProtocol
- Returns:
- the human readable protocol display name.
-
handle
public void handle(Socket socket) throws IOException, InterruptedException
Description copied from class:AgentProtocol
Called by the connection handling thread to execute the protocol.- Specified by:
handle
in classAgentProtocol
- Throws:
IOException
InterruptedException
-
connect
public boolean connect(Socket socket) throws IOException
- Throws:
IOException
-
-