Top Description Inners Fields Constructors Methods
org.eclipse.jgit.http.server.glue

pack-priv Class SuffixPipeline

extends UrlPipeline
Class Inheritance
Imports
java.io.IOException, jakarta.servlet.Filter, .ServletException, jakarta.servlet.http.HttpServlet, .HttpServletRequest, .HttpServletResponse

Selects requests by matching the suffix of the URI.

The suffix string is literally matched against the path info of the servlet request, as this class assumes it is invoked by MetaServlet. Suffix strings may include path components. Examples include /info/refs, or just simple extension matches like .txt.

When dispatching to the rest of the pipeline the HttpServletRequest is modified so that getPathInfo() does not contain the suffix that caused this pipeline to be selected.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
private final String
private final int

Constructor Summary

AccessConstructor and Description
pack-priv
SuffixPipeline(final String suffix, final Filter[] filters, final HttpServlet servlet)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
match(HttpServletRequest
current HTTP request being considered by MetaServlet.
req
)

Implements abstract org.eclipse.jgit.http.server.glue.UrlPipeline.match.

Determine if this pipeline handles the request's URL.

pack-priv void
service(HttpServletRequest
current HTTP request.
req
,
HttpServletResponse
current HTTP response.
rsp
)

Overrides org.eclipse.jgit.http.server.glue.UrlPipeline.service.

Execute the filters and the servlet on the request.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from org.eclipse.jgit.http.server.glue.UrlPipeline:
destroyinit

Field Detail

suffixback to summary
private final String suffix
suffixLenback to summary
private final int suffixLen

Constructor Detail

SuffixPipelineback to summary
pack-priv SuffixPipeline(final String suffix, final Filter[] filters, final HttpServlet servlet)

Method Detail

matchback to summary
pack-priv boolean match(HttpServletRequest req)

Implements abstract org.eclipse.jgit.http.server.glue.UrlPipeline.match.

Doc from org.eclipse.jgit.http.server.glue.UrlPipeline.match.

Determine if this pipeline handles the request's URL.

This method should match on the request's getPathInfo() method, as MetaServlet passes the request along as-is to each pipeline's match method.

Parameters
req:HttpServletRequest

current HTTP request being considered by MetaServlet.

Returns:boolean

true if this pipeline is configured to handle the request; false otherwise.

Annotations
@Override
serviceback to summary
pack-priv void service(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException

Overrides org.eclipse.jgit.http.server.glue.UrlPipeline.service.

Doc from org.eclipse.jgit.http.server.glue.UrlPipeline.service.

Execute the filters and the servlet on the request.

Invoked by MetaServlet once match(HttpServletRequest) has determined this pipeline is the correct pipeline to handle the current request.

Parameters
req:HttpServletRequest

current HTTP request.

rsp:HttpServletResponse

current HTTP response.

Annotations
@Override
Exceptions
ServletException:
request cannot be completed.
IOException:
IO error prevents the request from being completed.
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
org.eclipse.jgit.http.server.glue back to summary

pack-priv Class SuffixPipeline.Binder

extends ServletBinderImpl
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String

Constructor Summary

AccessConstructor and Description
pack-priv
Binder(String suffix)

Method Summary

Modifier and TypeMethod and Description
pack-priv UrlPipeline
create()

Implements abstract org.eclipse.jgit.http.server.glue.ServletBinderImpl.create.

Create UrlPipeline

Inherited from org.eclipse.jgit.http.server.glue.ServletBinderImpl:
getFiltersgetServletthroughwith

Field Detail

suffixback to summary
private final String suffix

Constructor Detail

Binderback to summary
pack-priv Binder(String suffix)

Method Detail

createback to summary
pack-priv UrlPipeline create()

Implements abstract org.eclipse.jgit.http.server.glue.ServletBinderImpl.create.

Doc from org.eclipse.jgit.http.server.glue.ServletBinderImpl.create.

Create UrlPipeline

Returns:UrlPipeline

the pipeline that matches and executes this chain.

Annotations
@Override