Package org.glassfish.grizzly.spdy
Class PushResource.PushResourceBuilder
java.lang.Object
org.glassfish.grizzly.spdy.PushResource.PushResourceBuilder
- Enclosing class:
- PushResource
PushResource builder to be used to create
PushResource instance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Returns thePushResourceinstance.contentType(String contentType) Sets the push data content-type.Adds additional header to be pushed.Adds additional header to be pushed.priority(int priority) Sets the SPDY stream priority to be used.Sets theSourceto be pushed.statusCode(int statusCode) Sets the HTTP status to be pushed along with the resource.statusCode(int statusCode, String reasonPhrase) Sets the HTTP status and the reason phrase to be pushed along with the resource.statusCode(org.glassfish.grizzly.http.util.HttpStatus statusCode) Sets theHttpStatusto be pushed along with the resource.
-
Constructor Details
-
PushResourceBuilder
public PushResourceBuilder()
-
-
Method Details
-
source
Sets theSourceto be pushed.- Parameters:
source- theSourceto be pushed.- Returns:
PushResource.PushResourceBuilder.
-
priority
Sets the SPDY stream priority to be used.- Parameters:
priority- the SPDY stream priority to be used.- Returns:
PushResource.PushResourceBuilder.
-
statusCode
public PushResource.PushResourceBuilder statusCode(org.glassfish.grizzly.http.util.HttpStatus statusCode) Sets theHttpStatusto be pushed along with the resource.- Parameters:
statusCode- theHttpStatusto be pushed along with the resource.- Returns:
PushResource.PushResourceBuilder.
-
statusCode
Sets the HTTP status to be pushed along with the resource.- Parameters:
statusCode- the HTTP status to be pushed along with the resource.- Returns:
PushResource.PushResourceBuilder.
-
statusCode
Sets the HTTP status and the reason phrase to be pushed along with the resource.- Parameters:
statusCode- the HTTP status to be pushed along with the resource.reasonPhrase- the HTTP status reason phrase to be pushed along with the resource.- Returns:
PushResource.PushResourceBuilder.
-
contentType
Sets the push data content-type.- Parameters:
contentType- the push data content-type.- Returns:
PushResource.PushResourceBuilder.
-
header
Adds additional header to be pushed.- Parameters:
name- the header name.value- the header value.- Returns:
PushResource.PushResourceBuilder.
-
header
public PushResource.PushResourceBuilder header(org.glassfish.grizzly.http.util.Header name, String value) Adds additional header to be pushed.- Parameters:
name- the header name.value- the header value.- Returns:
PushResource.PushResourceBuilder.
-
build
Returns thePushResourceinstance.
-