1 /*
2  * Copyright (c) OSGi Alliance (2012, 2017). All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package org.osgi.service.http.runtime.dto;
18 
19 
20 /**
21  * Represents a {@code javax.servlet.Servlet} currently being used by a servlet
22  * context.
23  *
24  * @NotThreadSafe
25  * @author $Id: 5c7720dbf46d1c7d8c3c2a9dfc386739d615191a $
26  */
27 public class ServletDTO extends BaseServletDTO {
28 	/**
29 	 * The request mappings for the servlet.
30 	 * <p>
31 	 * The specified patterns are used to determine whether a request is mapped
32 	 * to the servlet. This array is never {@code null}. It might be empty for
33 	 * named servlets.
34 	 */
35 	public String[]				patterns;
36 
37 	/**
38 	 * Specifies whether multipart support is enabled.
39 	 * @since 1.1
40 	 */
41 	public boolean				multipartEnabled;
42 
43 	/**
44 	 * Specifies the size threshold after which the file will be written to
45 	 * disk. If multipart is not enabled for this servlet, {@code 0} is
46 	 * returned.
47 	 *
48 	 * @since 1.1
49 	 * @see #multipartEnabled
50 	 */
51 	public int					multipartFileSizeThreshold;
52 
53 	/**
54 	 * Specifies the location where the files can be stored on disk. If
55 	 * multipart is not enabled for this servlet, {@code null} is returned.
56 	 *
57 	 * @since 1.1
58 	 * @see #multipartEnabled
59 	 */
60 	public String				multipartLocation;
61 
62 	/**
63 	 * Specifies the maximum size of a file being uploaded. If multipart is not
64 	 * enabled for this servlet, {@code 0} is returned.
65 	 *
66 	 * @since 1.1
67 	 * @see #multipartEnabled
68 	 */
69 	public long					multipartMaxFileSize;
70 
71 	/**
72 	 * Specifies the maximum request size. If multipart is not enabled for this
73 	 * servlet, {@code 0} is returned.
74 	 *
75 	 * @since 1.1
76 	 * @see #multipartEnabled
77 	 */
78 	public long					multipartMaxRequestSize;
79 }
80