Package jenkins.slaves
Class JnlpSlaveAgentProtocol4
java.lang.Object
jenkins.AgentProtocol
jenkins.slaves.JnlpSlaveAgentProtocol4
- All Implemented Interfaces:
ExtensionPoint
Master-side implementation for JNLP4-connect protocol.
@see JnlpProtocol4Handler for more details.
- Since:
- 2.27 available as experimental protocol, 2.41 enabled by default
-
Nested Class Summary
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the human readable protocol display name.getName()Protocol name.voidCalled by the connection handling thread to execute the protocol.booleanisOptIn()Allow experimentalAgentProtocolimplementations to declare being opt-in.Methods inherited from class jenkins.AgentProtocol
all, isDeprecated, isRequired, of
-
Constructor Details
-
JnlpSlaveAgentProtocol4
public JnlpSlaveAgentProtocol4()
-
-
Method Details
-
isOptIn
public boolean isOptIn()Description copied from class:AgentProtocolAllow experimentalAgentProtocolimplementations to declare being opt-in. Note thatJenkins.setAgentProtocols(Set)only records the protocols where the admin has made a conscious decision thus:- if a protocol is opt-in, it records the admin enabling it
- if a protocol is opt-out, it records the admin disabling it
opt-in -> opt-out -> opt-in. Implementations should never flip-flop:opt-in -> opt-out -> opt-in -> opt-outas that will basically clear any preference that an admin has set. This latter restriction should be ok as we only ever will be adding new protocols and retiring old ones.- Overrides:
isOptInin classAgentProtocol- Returns:
trueif the protocol requires explicit opt-in.- See Also:
-
getDisplayName
Description copied from class:AgentProtocolReturns the human readable protocol display name.- Overrides:
getDisplayNamein classAgentProtocol- Returns:
- the human readable protocol display name.
-
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.
-
handle
Description copied from class:AgentProtocolCalled by the connection handling thread to execute the protocol.- Specified by:
handlein classAgentProtocol- Throws:
IOExceptionInterruptedException
-