Class JnlpAgentEndpoint

java.lang.Object
org.jenkinsci.remoting.engine.JnlpAgentEndpoint

public class JnlpAgentEndpoint extends Object
Represents a TcpSlaveAgentListener endpoint details.
Since:
3.0
  • Constructor Details

  • Method Details

    • getAddress

      @NonNull public InetSocketAddress getAddress()
      Gets the socket address.
      Returns:
      the socket address
    • getServiceUrl

      @CheckForNull public URL getServiceUrl()
      Retrieves URL of the web service providing the remoting endpoint.
      Returns:
      Service URL if available. null otherwise.
    • getHost

      @NonNull public String getHost()
      Gets the hostname.
      Returns:
      the hostname.
    • getPort

      public int getPort()
      Gets the port.
      Returns:
      the port.
    • getPublicKey

      @CheckForNull public RSAPublicKey getPublicKey()
      Gets the InstanceIdentity.getPublic() if available.
      Returns:
      the InstanceIdentity.getPublic() or null.
    • getProtocols

      @CheckForNull public Set<String> getProtocols()
      Gets the supported protocols if available.
      Returns:
      the supported protocols or null.
    • isProtocolSupported

      public boolean isProtocolSupported(@NonNull String name)
      Checks if the named protocol is supported.
      Parameters:
      name - the name of the protocol to check.
      Returns:
      false if and only if the endpoint reports supported protocols and the named protocol is not in the list of supported protocols.
    • open

      public Socket open(int socketTimeout) throws IOException
      Opens a socket connection to the remote endpoint.
      Parameters:
      socketTimeout - the Socket.setSoTimeout(int) to apply to the socket.
      Returns:
      the socket.
      Throws:
      IOException - if things go wrong.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object