Class ChannelStateException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.io.IOException
org.jenkinsci.remoting.ChannelStateException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChannelClosedException

public class ChannelStateException extends IOException
Indicates invalid state of the channel during the operation. Exception stores the channel reference is a WeakReference, so the information may be deallocated at any moment. Former channel name can be retrieved via getChannelName(). The reference also will not be serialized.
Since:
3.15
Author:
Oleg Nenashev
See Also:
  • Constructor Details

    • ChannelStateException

      public ChannelStateException(@CheckForNull Channel channel, @NonNull String message)
    • ChannelStateException

      public ChannelStateException(@CheckForNull Channel channel, String message, @CheckForNull Throwable cause)
  • Method Details

    • getChannelRef

      @CheckForNull public WeakReference<Channel> getChannelRef()
    • getChannelName

      @NonNull public String getChannelName()
      Gets channel name.
      Returns:
      Channel name ot unknown if it is not known.
    • getChannel

      @CheckForNull public Channel getChannel()
      Gets channel associated with the exception. The channel reference is a WeakReference, so the information may be deallocated at any moment. Former channel name can be retrieved via getChannelName(). The reference also will not be serialized.
      Returns:
      Channel reference if it is available. null otherwise.
    • getMessage

      public String getMessage()
      Overrides:
      getMessage in class Throwable