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 class
HTTP response that allows a client to use this service. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic long
Controls the time out of waiting for the 2nd HTTP request to arrive.static boolean
Set to true if the servlet container doesn't support chunked encoding.protected final UUID
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
download
(org.kohsuke.stapler.StaplerRequest req, org.kohsuke.stapler.StaplerResponse rsp) This is where we send the data to the client.protected abstract void
run
(InputStream upload, OutputStream download) void
upload
(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:
InterruptedException
IOException
-
run
protected abstract void run(InputStream upload, OutputStream download) throws IOException, InterruptedException - Throws:
IOException
InterruptedException
-
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:
InterruptedException
IOException
-