Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-60381] Remove old, deprecated agent protocols. #4387

Merged
merged 5 commits into from
Jan 10, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,5 +216,5 @@ public void setLog(@Nonnull OutputStream log) {

private static final Logger LOGGER = Logger.getLogger(DefaultJnlpSlaveReceiver.class.getName());

private static final String COOKIE_NAME = JnlpSlaveAgentProtocol2.class.getName()+".cookie";
jeffret-b marked this conversation as resolved.
Show resolved Hide resolved
private static final String COOKIE_NAME = "JnlpAgentProtocol.cookie";
}

This file was deleted.

40 changes: 2 additions & 38 deletions core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,56 +42,20 @@
* @author Kohsuke Kawaguchi
* @since 1.467
*/
@Extension
@Symbol("jnlp")
public class JnlpSlaveAgentProtocol extends AgentProtocol {
jeffret-b marked this conversation as resolved.
Show resolved Hide resolved
jeffret-b marked this conversation as resolved.
Show resolved Hide resolved
/**
* Our logger
*/
private static final Logger LOGGER = Logger.getLogger(JnlpSlaveAgentProtocol.class.getName());
/**
* This secret value is used as a seed for agents.
*/
public static final HMACConfidentialKey SLAVE_SECRET =
new HMACConfidentialKey(JnlpSlaveAgentProtocol.class, "secret");

private NioChannelSelector hub;

private JnlpProtocol1Handler handler;

@Inject
public void setHub(NioChannelSelector hub) {
this.hub = hub;
this.handler = new JnlpProtocol1Handler(JnlpAgentReceiver.DATABASE, Computer.threadPoolForRemoting,
hub.getHub(), true);
}

@Override
public boolean isOptIn() {
return true;
}

@Override
public boolean isDeprecated() {
return true;
}

@Override
public String getName() {
return handler.isEnabled() ? handler.getName() : null;
}

@Override
public String getDisplayName() {
return Messages.JnlpSlaveAgentProtocol_displayName();
return null;
}

@Override
public void handle(Socket socket) throws IOException, InterruptedException {
handler.handle(socket,
Collections.singletonMap(JnlpConnectionState.COOKIE_KEY, JnlpAgentReceiver.generateCookie()),
ExtensionList.lookup(JnlpAgentReceiver.class));
}


}
}
67 changes: 0 additions & 67 deletions core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol2.java

This file was deleted.

64 changes: 0 additions & 64 deletions core/src/main/java/jenkins/slaves/JnlpSlaveAgentProtocol3.java

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading