Package hudson.cli
Class FullDuplexHttpStream
- java.lang.Object
-
- hudson.cli.FullDuplexHttpStream
-
public class FullDuplexHttpStream extends Object
Creates a capacity-unlimited bi-directionalInputStream/OutputStreampair over HTTP, which is a request/response protocol.FullDuplexHttpServiceis the counterpart on the server side.- Author:
- Kohsuke Kawaguchi
-
-
Constructor Summary
Constructors Constructor Description FullDuplexHttpStream(URL base, String relativeTarget, String authorization)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamgetInputStream()Get data from the server.OutputStreamgetOutputStream()Upload data to the server.
-
-
-
Constructor Detail
-
FullDuplexHttpStream
public FullDuplexHttpStream(URL base, String relativeTarget, String authorization) throws IOException
- Parameters:
base- the base URL of Jenkins.relativeTarget- The endpoint that we are making requests to.authorization- The value of the authorization header.- Throws:
IOException
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
Get data from the server. An initial zero byte is used as a handshake which you should expect and ignore.
-
getOutputStream
public OutputStream getOutputStream()
Upload data to the server. You will need to write to this andOutputStream.flush()it to establish a connection.
-
-