KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > web > PEWebContainerFeatureFactoryImpl


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 package com.sun.enterprise.web;
25
26 import com.sun.enterprise.server.pluggable.WebContainerFeatureFactory;
27 import com.sun.enterprise.admin.monitor.stats.WebModuleStats;
28 import com.sun.enterprise.web.stats.WebModuleStatsImpl;
29 import com.sun.enterprise.web.WebContainerAdminEventProcessor;
30 import com.sun.enterprise.web.PEWebContainerAdminEventProcessor;
31 import com.sun.enterprise.web.WebContainerStartStopOperation;
32 import com.sun.enterprise.web.PEWebContainerStartStopOperation;
33 import com.sun.enterprise.web.SSOFactory;
34 import com.sun.enterprise.web.PESSOFactory;
35
36 /**
37  * Implementation of WebContainerFeatureFactory which returns web container
38  * feature implementations for PE.
39  */

40 public class PEWebContainerFeatureFactoryImpl
41         implements WebContainerFeatureFactory {
42
43     public WebModuleStats getWebModuleStats() {
44         return new WebModuleStatsImpl();
45     }
46     
47     public WebContainerAdminEventProcessor getWebContainerAdminEventProcessor() {
48         return new PEWebContainerAdminEventProcessor();
49     }
50
51     public WebContainerStartStopOperation getWebContainerStartStopOperation() {
52         return new PEWebContainerStartStopOperation();
53     }
54     
55     public HealthChecker getHADBHealthChecker(WebContainer webContainer) {
56         return new PEHADBHealthChecker(webContainer);
57     }
58     
59     public SSOFactory getSSOFactory() {
60         return new PESSOFactory();
61     }
62
63     public VirtualServer getVirtualServer() {
64         return new VirtualServer();
65     }
66     
67     public String JavaDoc getSSLImplementationName(){
68         return null;
69     }
70
71     /**
72      * Gets the default access log file prefix.
73      *
74      * @return The default access log file prefix
75      */

76     public String JavaDoc getDefaultAccessLogPrefix() {
77         return "_access_log.";
78     }
79
80     /**
81      * Gets the default access log file suffix.
82      *
83      * @return The default access log file suffix
84      */

85     public String JavaDoc getDefaultAccessLogSuffix() {
86         return ".txt";
87     }
88
89     /**
90      * Gets the default datestamp pattern to be applied to access log files.
91      *
92      * @return The default datestamp pattern to be applied to access log files
93      */

94     public String JavaDoc getDefaultAccessLogDateStampPattern() {
95         return "yyyy-MM-dd";
96     }
97
98     /**
99      * Returns true if the first access log file and all subsequently rotated
100      * ones are supposed to be date-stamped, and false if datestamp is to be
101      * added only starting with the first rotation.
102      *
103      * @return true if first access log file and all subsequently rotated
104      * ones are supposed to be date-stamped, and false if datestamp is to be
105      * added only starting with the first rotation.
106      */

107     public boolean getAddDateStampToFirstAccessLogFile() {
108         return true;
109     }
110
111     /**
112      * Gets the default rotation interval in minutes.
113      *
114      * @return The default rotation interval in minutes
115      */

116     public int getDefaultRotationIntervalInMinutes() {
117         return 15;
118     }
119 }
120
Popular Tags