Package jenkins.slaves
Class JnlpAgentReceiver
- java.lang.Object
-
- org.jenkinsci.remoting.engine.JnlpConnectionStateListener
-
- jenkins.slaves.JnlpAgentReceiver
-
- All Implemented Interfaces:
ExtensionPoint
- Direct Known Subclasses:
DefaultJnlpSlaveReceiver
public abstract class JnlpAgentReceiver extends org.jenkinsci.remoting.engine.JnlpConnectionStateListener implements ExtensionPoint
Receives incoming agents connecting through the likes ofJnlpSlaveAgentProtocol4
orWebSocketAgents
.This is useful to establish the communication with other JVMs and use them for different purposes outside
Slave
s.- When the
exists(String)
method is invoked for an agent, theowns(String)
method is called on all the extension points: if no owner is found an exception is thrown. - If owner is found, then the
JnlpConnectionState
lifecycle methods are invoked for all registeredJnlpConnectionStateListener
until the one which changes the state ofJnlpConnectionState
by setting an approval or rejected state is found. When found, that listener will be set as the owner of the incoming connection event. - Subsequent steps of the connection lifecycle are only called on the
JnlpAgentReceiver
implementation owner for that connection event.
- Since:
- 1.561
- Author:
- Kohsuke Kawaguchi
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description static org.jenkinsci.remoting.engine.JnlpClientDatabase
DATABASE
static HMACConfidentialKey
SLAVE_SECRET
This secret value is used as a seed for agents.
-
Constructor Summary
Constructors Constructor Description JnlpAgentReceiver()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static ExtensionList<JnlpAgentReceiver>
all()
static boolean
exists(String clientName)
static String
generateCookie()
protected abstract boolean
owns(String clientName)
-
-
-
Field Detail
-
SLAVE_SECRET
public static final HMACConfidentialKey SLAVE_SECRET
This secret value is used as a seed for agents.
-
DATABASE
public static final org.jenkinsci.remoting.engine.JnlpClientDatabase DATABASE
-
-
Method Detail
-
all
public static ExtensionList<JnlpAgentReceiver> all()
-
exists
public static boolean exists(String clientName)
-
owns
protected abstract boolean owns(String clientName)
-
generateCookie
public static String generateCookie()
-
-