Class Capability

java.lang.Object
hudson.remoting.Capability
All Implemented Interfaces:
Serializable

public final class Capability extends Object implements Serializable
Represents additional features implemented on Channel.

Each Channel exposes its capability to Channel.getProperty(Object).

This mechanism allows two different versions of remoting.jar to talk to each other.

Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

  • Constructor Details

    • Capability

      public Capability()
  • Method Details

    • supportsMultiClassLoaderRPC

      public boolean supportsMultiClassLoaderRPC()
      Does this implementation supports multi-classloader serialization in UserRequest?
      See Also:
      • MultiClassLoaderSerializer
    • supportsPipeThrottling

      public boolean supportsPipeThrottling()
      Does the implementation supports window size control over pipes?
      See Also:
      • ProxyOutputStream
    • hasMimicException

      @Deprecated public boolean hasMimicException()
      Deprecated.
      no longer used
    • supportsChunking

      public boolean supportsChunking()
      Supports chunking to designate a command boundary.

      In this mode, the wire format of the data changes to:

      • Include the framing (length+payload) so that a command boundary can be discovered without understanding the Java serialization wire format.
      • Each command is serialized by its ObjectOutputStream
      This is necessary for the NIO transport to work.
      See Also:
    • supportsPrefetch

      public boolean supportsPrefetch()
      Does the implementation allow classes to be prefetched and JARs to be cached?
      Since:
      2.24
    • supportsGreedyRemoteInputStream

      public boolean supportsGreedyRemoteInputStream()
      Does RemoteInputStream supports greedy flag.
      Since:
      2.35
    • supportsProxyWriter2_35

      public boolean supportsProxyWriter2_35()
      Does ProxyWriter supports proper throttling? This flag is also used to check other improvements made in ProxyWriter at the same time.
      Since:
      2.35
    • supportsProxyExceptionFallback

      public boolean supportsProxyExceptionFallback()
      Supports ProxyException as a fallback when failing to deserialize UserRequest exceptions.
      Since:
      3.19
      See Also:
    • read

      public static Capability read(InputStream is) throws IOException
      The opposite operation of write(java.io.OutputStream).
      Throws:
      IOException
    • toASCII

      public String toASCII() throws IOException
      Uses write(java.io.OutputStream) to serialize this object to a Base64-encoded ASCII stream.
      Throws:
      IOException
    • fromASCII

      public static Capability fromASCII(String ascii) throws IOException
      The inverse of toASCII().
      Throws:
      IOException
    • toString

      public String toString()
      Overrides:
      toString in class Object