public class JnlpAgentEndpoint extends Object
TcpSlaveAgentListener
endpoint details.Constructor and Description |
---|
JnlpAgentEndpoint(String host,
int port,
RSAPublicKey publicKey,
Set<String> protocols)
|
JnlpAgentEndpoint(String host,
int port,
RSAPublicKey publicKey,
Set<String> protocols,
URL serviceURL)
Constructor for a remote
Jenkins instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
InetSocketAddress |
getAddress()
Gets the socket address.
|
String |
getHost()
Gets the hostname.
|
int |
getPort()
Gets the port.
|
Set<String> |
getProtocols()
Gets the supported protocols if available.
|
RSAPublicKey |
getPublicKey()
Gets the
InstanceIdentity.getPublic() if available. |
URL |
getServiceUrl()
Retrieves URL of the web service providing the remoting endpoint.
|
int |
hashCode() |
boolean |
isProtocolSupported(String name)
Checks if the named protocol is supported.
|
Socket |
open(int socketTimeout)
Opens a socket connection to the remote endpoint.
|
String |
toString() |
@Deprecated public JnlpAgentEndpoint(@NonNull String host, int port, @CheckForNull RSAPublicKey publicKey, @CheckForNull Set<String> protocols)
public JnlpAgentEndpoint(@NonNull String host, int port, @CheckForNull RSAPublicKey publicKey, @CheckForNull Set<String> protocols, @CheckForNull URL serviceURL)
Jenkins
instance.host
- the hostname.port
- the port.publicKey
- the InstanceIdentity.getPublic()
of the remote instance (if known).protocols
- The supported protocols.serviceURL
- URL of the service hosting the remoting endpoint.
Use null
if it is not a web service or if the URL cannot be determined@NonNull public InetSocketAddress getAddress()
@CheckForNull public URL getServiceUrl()
null
otherwise.@NonNull public String getHost()
public int getPort()
@CheckForNull public RSAPublicKey getPublicKey()
InstanceIdentity.getPublic()
if available.InstanceIdentity.getPublic()
or null
.@CheckForNull public Set<String> getProtocols()
null
.public boolean isProtocolSupported(@NonNull String name)
name
- the name of the protocol to check.false
if and only if the endpoint reports supported protocols and the named protocol is not in
the list of supported protocols.public Socket open(int socketTimeout) throws IOException
socketTimeout
- the Socket.setSoTimeout(int)
to apply to the socket.IOException
- if things go wrong.Copyright © 2004–2022. All rights reserved.