KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > jdon > bussinessproxy > remote > http > HttpServerParam


1 /**
2  * Copyright 2003-2006 the original author or authors.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6
7        http://www.apache.org/licenses/LICENSE-2.0
8
9   * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */

15
16 package com.jdon.bussinessproxy.remote.http;
17
18 /**
19  *
20  * host port servletPath是必须设置的。
21  *
22  * </p>
23  * @author banq
24  */

25 public class HttpServerParam {
26
27   /** Default Server Host*/
28   private static final String JavaDoc SERVER_HOST = "localhost";
29
30   /** Default Server Port*/
31   private static final int SERVER_PORT = 8080;
32
33   /** Default Server File*/
34   private static final String JavaDoc SERVICE_PATH = "/AuthTest/auth/EJBInvokerServlet";
35
36   protected static final String JavaDoc LOGIN_PATH = "/AuthTest/auth/EJBInvokerServlet";
37
38   private String JavaDoc host;
39
40   private String JavaDoc servletPath;
41
42   /** Http Port used */
43   private int port = -1;
44
45   private String JavaDoc loginPath;
46   
47   private boolean debug = false;
48
49   public HttpServerParam() {
50
51   }
52
53   public HttpServerParam(String JavaDoc host, int port, String JavaDoc servletPath) {
54     this.host = host;
55     this.port = port;
56     this.servletPath = servletPath;
57   }
58
59   
60   
61 /**
62  * @return Returns the debug.
63  */

64 public boolean isDebug() {
65     return debug;
66 }
67 /**
68  * @param debug The debug to set.
69  */

70 public void setDebug(boolean debug) {
71     this.debug = debug;
72 }
73
74   public String JavaDoc getHost() {
75     return (this.host == null) ? SERVER_HOST : this.host;
76   }
77
78   public void setHost(String JavaDoc host) {
79     this.host = host;
80   }
81
82   public String JavaDoc getServletPath() {
83     return (this.servletPath == null) ? SERVICE_PATH : this.servletPath;
84   }
85
86   public void setServletPath(String JavaDoc servletPath) {
87     this.servletPath = servletPath;
88
89   }
90
91   public String JavaDoc getLoginPath() {
92     return (this.loginPath == null) ? LOGIN_PATH : this.loginPath;
93   }
94
95   public void setLoginPath(String JavaDoc loginPath) {
96     this.loginPath = loginPath;
97
98   }
99
100   public int getPort() {
101     return (this.port == -1) ? SERVER_PORT : this.port;
102   }
103
104   public void setPort(int port) {
105     this.port = port;
106   }
107
108 }
109
Popular Tags