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 the
TcpSlaveAgentListener
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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns the human readable protocol display name.getName()
Protocol name.void
Called by the connection handling thread to execute the protocol.boolean
Allow essentialAgentProtocol
implementations (basicallyTcpSlaveAgentListener.PingAgentProtocol
) to be always enabled.Methods inherited from class jenkins.AgentProtocol
all, isDeprecated, isOptIn, of
-
Constructor Details
-
PingAgentProtocol
public PingAgentProtocol()
-
-
Method Details
-
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
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
Description copied from class:AgentProtocol
Returns the human readable protocol display name.- Overrides:
getDisplayName
in classAgentProtocol
- Returns:
- the human readable protocol display name.
-
handle
Description copied from class:AgentProtocol
Called by the connection handling thread to execute the protocol.- Specified by:
handle
in classAgentProtocol
- Throws:
IOException
InterruptedException
-
connect
- Throws:
IOException
-