Package org.jenkinsci.remoting.engine
Class JnlpAgentEndpoint
java.lang.Object
org.jenkinsci.remoting.engine.JnlpAgentEndpoint
Represents a
TcpSlaveAgentListener endpoint details.- Since:
- 3.0
-
Constructor Summary
ConstructorsConstructorDescriptionJnlpAgentEndpoint(String host, int port, RSAPublicKey publicKey, Set<String> protocols) Deprecated.JnlpAgentEndpoint(String host, int port, RSAPublicKey publicKey, Set<String> protocols, URL serviceURL) Deprecated.JnlpAgentEndpoint(String host, int port, RSAPublicKey publicKey, Set<String> protocols, URL serviceURL, String proxyCredentials) Constructor for a remoteJenkinsinstance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanGets the socket address.getHost()Gets the hostname.intgetPort()Gets the port.Gets the supported protocols if available.Gets theInstanceIdentity.getPublic()if available.Retrieves URL of the web service providing the remoting endpoint.inthashCode()booleanisProtocolSupported(String name) Checks if the named protocol is supported.open(int socketTimeout) Opens a socket connection to the remote endpoint.toString()
-
Constructor Details
-
JnlpAgentEndpoint
@Deprecated public JnlpAgentEndpoint(@NonNull String host, int port, @CheckForNull RSAPublicKey publicKey, @CheckForNull Set<String> protocols) Deprecated. -
JnlpAgentEndpoint
@Deprecated public JnlpAgentEndpoint(@NonNull String host, int port, @CheckForNull RSAPublicKey publicKey, @CheckForNull Set<String> protocols, @CheckForNull URL serviceURL) Deprecated. -
JnlpAgentEndpoint
public JnlpAgentEndpoint(@NonNull String host, int port, @CheckForNull RSAPublicKey publicKey, @CheckForNull Set<String> protocols, @CheckForNull URL serviceURL, @CheckForNull String proxyCredentials) Constructor for a remoteJenkinsinstance.- Parameters:
host- the hostname.port- the port.publicKey- theInstanceIdentity.getPublic()of the remote instance (if known).protocols- The supported protocols.serviceURL- URL of the service hosting the remoting endpoint. Usenullif it is not a web service or if the URL cannot be determined- Since:
- 3.0
-
-
Method Details
-
getAddress
Gets the socket address.- Returns:
- the socket address
-
getServiceUrl
Retrieves URL of the web service providing the remoting endpoint.- Returns:
- Service URL if available.
nullotherwise.
-
getHost
Gets the hostname.- Returns:
- the hostname.
-
getPort
public int getPort()Gets the port.- Returns:
- the port.
-
getPublicKey
Gets theInstanceIdentity.getPublic()if available.- Returns:
- the
InstanceIdentity.getPublic()ornull.
-
getProtocols
Gets the supported protocols if available.- Returns:
- the supported protocols or
null.
-
isProtocolSupported
Checks if the named protocol is supported.- Parameters:
name- the name of the protocol to check.- Returns:
falseif and only if the endpoint reports supported protocols and the named protocol is not in the list of supported protocols.
-
open
Opens a socket connection to the remote endpoint.- Parameters:
socketTimeout- theSocket.setSoTimeout(int)to apply to the socket.- Returns:
- the socket.
- Throws:
IOException- if things go wrong.
-
hashCode
public int hashCode() -
equals
-
toString
-
JnlpAgentEndpoint(String, int, RSAPublicKey, Set, URL, String)