Package hudson.remoting
Class Command
java.lang.Object
hudson.remoting.Command
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Request
,Response
,UnexportCommand
One-way command to be sent over to the remote system and executed there.
This is the smallest unit of message in remoting from one side to another,
such as "please execute this method" or "here's the return value from an earlier method call".
This is layer 0, the lower most layer.
At this level, remoting of class files are not provided, so both Channel
s
need to have the definition of Command
-implementation.
- Since:
- 3.17
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionObtains a diagnostic stack trace recording the point at which the command was created.static Command
Reads command from the specified payload.abstract String
toString()
Should provide concise information useful forChannel.Listener
.
-
Method Details
-
readFrom
public static Command readFrom(@NonNull Channel channel, @NonNull byte[] payload) throws IOException, ClassNotFoundException Reads command from the specified payload.- Parameters:
channel
- Channelpayload
- Payload- Returns:
- Read command
- Throws:
IOException
- Read exceptionClassNotFoundException
- Deserialization error: class not found- Since:
- 3.22
-
getCreationStackTrace
Obtains a diagnostic stack trace recording the point at which the command was created. This is not necessarily the point at which the command was delivered or run. Part of the stack trace might have been produced on a remote machine, in which caseProxyException
may be used in place of the original.- Returns:
- an information stack trace, or null if not recorded
-
toString
Should provide concise information useful forChannel.Listener
.
-