Package org.jenkinsci.remoting
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
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 Summary
ConstructorDescriptionChannelStateException
(Channel channel, String message) ChannelStateException
(Channel channel, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionGets channel associated with the exception.Gets channel name.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
ChannelStateException
-
ChannelStateException
-
-
Method Details
-
getChannelRef
-
getChannelName
Gets channel name.- Returns:
- Channel name ot
unknown
if it is not known.
-
getChannel
Gets channel associated with the exception. The channel reference is aWeakReference
, so the information may be deallocated at any moment. Former channel name can be retrieved viagetChannelName()
. The reference also will not be serialized.- Returns:
- Channel reference if it is available.
null
otherwise.
-
getMessage
- Overrides:
getMessage
in classThrowable
-