Package jenkins.util
Class FullDuplexHttpService
- java.lang.Object
-
- jenkins.util.FullDuplexHttpService
-
- Direct Known Subclasses:
FullDuplexHttpChannel
public abstract class FullDuplexHttpService extends Object
Server-side counterpart toFullDuplexHttpStream.To use, bind this to an endpoint with
RootAction(you will also need aCrumbExclusion).- Since:
- 2.54
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFullDuplexHttpService.ResponseHTTP response that allows a client to use this service.
-
Field Summary
Fields Modifier and Type Field Description static longCONNECTION_TIMEOUTControls the time out of waiting for the 2nd HTTP request to arrive.static booleanDIY_CHUNKINGSet to true if the servlet container doesn't support chunked encoding.protected UUIDuuid
-
Constructor Summary
Constructors Modifier Constructor Description protectedFullDuplexHttpService(UUID uuid)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddownload(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 Detail
-
DIY_CHUNKING
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static boolean DIY_CHUNKING
Set to true if the servlet container doesn't support chunked encoding.
-
CONNECTION_TIMEOUT
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class) public static long CONNECTION_TIMEOUT
Controls the time out of waiting for the 2nd HTTP request to arrive.
-
uuid
protected final UUID uuid
-
-
Constructor Detail
-
FullDuplexHttpService
protected FullDuplexHttpService(UUID uuid)
-
-
Method Detail
-
download
public void download(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) throws InterruptedException, IOExceptionThis 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, IOExceptionThis is where we receive inputs from the client.- Throws:
InterruptedExceptionIOException
-
-