| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| private final UploadPackErrorHandler | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | doPost(HttpServletRequest
an req, HttpServletResponse HttpServletRequest object that contains the request the client has made of the servletan rsp)HttpServletResponse object that contains the response the servlet sends to the clientOverrides jakarta. Called by the server (via the |
| private void | |
| private void |
| handler | back to summary |
|---|---|
| private final UploadPackErrorHandler handler | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| UploadPackServlet | back to summary |
|---|---|
| pack-priv UploadPackServlet(UploadPackErrorHandler handler) | |
| defaultUploadPackHandler | back to summary |
|---|---|
| private void defaultUploadPackHandler(HttpServletRequest req, HttpServletResponse rsp, UploadPackErrorHandler. | |
| doPost | back to summary |
|---|---|
| public void doPost(HttpServletRequest req, HttpServletResponse rsp) throws IOException Overrides jakarta. Doc from jakarta. Called by the server (via the
When overriding this method, read the request data, write the response headers, get the response's writer or output
stream object, and finally, write the response data. It's best to include content type and encoding. When using a
The servlet container must write the headers before committing the response, because in HTTP the headers must be sent before the response body.
Where possible, set the Content-Length header (with the When using HTTP 1.1 chunked encoding (which means that the response has a Transfer-Encoding header), do not set the Content-Length header. This method does not need to be either safe or idempotent. Operations requested through POST can have side effects for which the user can be held accountable, for example, updating stored data or buying items online.
If the HTTP POST request is incorrectly formatted,
| |
| log | back to summary |
|---|---|
| private void log(Repository git, Throwable e) | |
| upload | back to summary |
|---|---|
| private void upload(HttpServletRequest req, HttpServletResponse rsp) throws IOException, ServiceMayNotContinueException | |
| Modifier and Type | Field and Description |
|---|---|
| private final UploadPackFactory |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | destroy()
Overrides default jakarta. Called by the web container to indicate to a filter that it is being taken out of service. |
| public void | doFilter(ServletRequest
the request, ServletResponse ServletRequest object contains the client's requestthe response, FilterChain ServletResponse object contains the filter's responsethe chain)FilterChain for invoking the next filter or the resourceImplements jakarta. The |
| public void | init(FilterConfig
a filterConfig)FilterConfig object containing the filter's configuration and initialization
parametersOverrides default jakarta. Called by the web container to indicate to a filter that it is being placed into service. |
| uploadPackFactory | back to summary |
|---|---|
| private final UploadPackFactory<HttpServletRequest> uploadPackFactory | |
| Factory | back to summary |
|---|---|
| pack-priv Factory(UploadPackFactory<HttpServletRequest> uploadPackFactory) | |
| destroy | back to summary |
|---|---|
| public void destroy() Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being taken out of service. This method is only called once all threads within the filter's doFilter method have exited or after a timeout period has passed. After the web container calls this method, it will not call the doFilter method again on this instance of the filter. This method gives the filter an opportunity to clean up any resources that are being held (for example, memory, file handles, threads) and make sure that any persistent state is synchronized with the filter's current state in memory.
| |
| doFilter | back to summary |
|---|---|
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException Implements jakarta. Doc from jakarta. The A typical implementation of this method would follow the following pattern:
| |
| init | back to summary |
|---|---|
| public void init(FilterConfig filterConfig) throws ServletException Overrides default jakarta. Doc from jakarta. Called by the web container to indicate to a filter that it is being placed into service.
The servlet container calls the init method exactly once after instantiating the filter. The init method must
complete successfully before the filter is asked to do any filtering work. The container will ensure that actions
performed in the The web container cannot place the filter into service if the init method either
| |
| Modifier and Type | Field and Description |
|---|---|
| private final UploadPackFactory |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected void | advertise(HttpServletRequest
request req, RefAdvertiser.used to frame lines in PacketLineOut format pckImplements abstract org. Advertise. |
| protected void | begin(HttpServletRequest
request req, Repository repository db)Implements abstract org. Begin service. |
| protected void | respond(HttpServletRequest
request req, PacketLineOut destination of response pckOut, String service name to be written out in protocol v0; may or may not
be used in other versions serviceName)Overrides org. Writes the appropriate response to an info/refs request received by a smart service. |
| uploadPackFactory | back to summary |
|---|---|
| private final UploadPackFactory<HttpServletRequest> uploadPackFactory | |
| InfoRefs | back to summary |
|---|---|
| pack-priv InfoRefs(UploadPackFactory<HttpServletRequest> uploadPackFactory, List<Filter> filters) | |
| advertise | back to summary |
|---|---|
| protected void advertise(HttpServletRequest req, RefAdvertiser. Implements abstract org. Doc from org. Advertise.
| |
| begin | back to summary |
|---|---|
| protected void begin(HttpServletRequest req, Repository db) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException Implements abstract org. Doc from org. Begin service.
| |
| respond | back to summary |
|---|---|
| protected void respond(HttpServletRequest req, PacketLineOut pckOut, String serviceName) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException Overrides org. Doc from org. Writes the appropriate response to an info/refs request received by a smart service. In protocol v0, this starts with "# service=serviceName" followed by a flush packet, but this is not necessarily the case in other protocol versions.
The default implementation writes "# service=serviceName" and a flush
packet, then calls
| |