Package jenkins.util
Class FullDuplexHttpService
java.lang.Object
jenkins.util.FullDuplexHttpService
- Direct Known Subclasses:
FullDuplexHttpChannel
Server-side counterpart to
FullDuplexHttpStream.
To use, bind this to an endpoint with RootAction (you will also need a CrumbExclusion).
- Since:
- 2.54
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classHTTP response that allows a client to use this service. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic longControls the time out of waiting for the 2nd HTTP request to arrive.static booleanSet to true if the servlet container doesn't support chunked encoding.protected final UUID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddownload(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) This is where we send the data to the client.protected abstract voidrun(InputStream upload, OutputStream download) voidupload(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) This is where we receive inputs from the client.
-
Field Details
-
DIY_CHUNKING
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean DIY_CHUNKINGSet to true if the servlet container doesn't support chunked encoding. -
CONNECTION_TIMEOUT
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static long CONNECTION_TIMEOUTControls the time out of waiting for the 2nd HTTP request to arrive. -
uuid
-
-
Constructor Details
-
FullDuplexHttpService
-
-
Method Details
-
download
public void download(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws InterruptedException, IOException This is where we send the data to the client.If this connection is lost, we'll abort the channel.
- Throws:
InterruptedExceptionIOException
-
run
protected abstract void run(InputStream upload, OutputStream download) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
upload
public void upload(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws InterruptedException, IOException This is where we receive inputs from the client.- Throws:
InterruptedExceptionIOException
-