KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > caucho > management > server > PortMXBean


1 /*
2  * Copyright (c) 1998-2006 Caucho Technology -- all rights reserved
3  *
4  * This file is part of Resin(R) Open Source
5  *
6  * Each copy or derived work must preserve the copyright notice and this
7  * notice unmodified.
8  *
9  * Resin Open Source is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * Resin Open Source is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
17  * of NON-INFRINGEMENT. See the GNU General Public License for more
18  * details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with Resin Open Source; if not, write to the
22  *
23  * Free Software Foundation, Inc.
24  * 59 Temple Place, Suite 330
25  * Boston, MA 02111-1307 USA
26  *
27  * @author Scott Ferguson
28  */

29
30 package com.caucho.management.server;
31
32 import com.caucho.jmx.Description;
33 import com.caucho.jmx.Units;
34
35 /**
36  * Represents a protocol connection.
37  *
38  * A typical ObjectName for a Port is
39  *
40  * <pre>
41  * resin:type=Port,port=80,address=INADDR_ANY
42  * </pre>
43  */

44 @Description("The protocol listening to an IP address.")
45 public interface PortMXBean extends ManagedObjectMXBean {
46   /**
47    * Returns the port's protocol name.
48    */

49   @Description("The configured protocol for the port")
50   public String JavaDoc getProtocolName();
51
52   /**
53    * Returns the ip address or used to bind the port.
54    */

55   @Description("The configured ip address or host name used to bind the port")
56   public String JavaDoc getAddress();
57
58   /**
59    * Returns the port number used to bind the port.
60    */

61   @Description("The configured port number used to bind the port")
62   public int getPort();
63
64   /**
65    * Returns the maximum number of active connections allowed for the port.
66    */

67   @Description("The configured maximum number of current connections")
68   public int getConnectionMax();
69
70   /**
71    * Returns the maximum number of keepalive connections allowed for the port.
72    */

73   @Description("The configured maximum number of keepalive connections")
74   public int getKeepaliveMax();
75
76   /**
77    * Returns the timeout for a keepalive connection
78    */

79   @Description("The configured timeout for keepalive connections")
80   public long getKeepaliveTimeout();
81
82   @Description("True if the port is using SSL encryption")
83   public boolean isSSL();
84
85   /**
86    * Returns the timeout for socket reads when waiting for data from a client.
87    *
88    * Corresponds to the functionality described in
89    * {@link java.net.Socket#setSoTimeout(int)}, although the actual
90    * socket connection may be handled in different ways.
91    */

92   @Description("The configured timeout for socket reads when waiting for data from a client")
93   @Units("milliseconds")
94   public long getSocketTimeout();
95
96   //
97
// State attributes
98
//
99

100   /*
101    * Returns the lifecycle state.
102    */

103   @Description("The current lifecycle state")
104   public String JavaDoc getState();
105
106   //
107
// Statistics
108
//
109

110   /**
111    * Returns the current number of threads that are servicing requests.
112    */

113   @Description("The current number of threads used by the port")
114   public int getThreadCount();
115
116   /**
117    * Returns the current number of threads that are servicing requests.
118    */

119   @Description("The current number of threads that are servicing requests")
120   public int getThreadActiveCount();
121
122   /**
123    * Returns the current number of threads that are idle and
124    * waiting to service requests.
125    */

126   @Description("The current number of threads that are"
127                + " idle and waiting to service requests")
128   public int getThreadIdleCount();
129
130   /**
131    * Returns the current number of connections that are in the keepalive
132    * state and are using a thread to maintain the connection.
133    */

134   @Description("The current number of connections that are" +
135                " in the keepalive state and are using" +
136                " a thread to maintain the connection")
137   public int getThreadKeepaliveCount();
138
139   /**
140    * Returns the current number of connections that are in the keepalive
141    * state and are using select to maintain the connection.
142    */

143   @Description("The current number of connections that are" +
144                " in the keepalive state and are using" +
145                " select to maintain the connection")
146   public int getSelectKeepaliveCount();
147
148   /**
149    * Returns the total number of requests serviced by the server
150    * since it started.
151    */

152   @Description("The total number of requests serviced by the"
153                + " server since it started")
154   public long getRequestCountTotal();
155
156   /**
157    * Returns the number of requests that have ended up in the keepalive state
158    * for this server in it's lifetime.
159    */

160   @Description("The total number of requests that have ended"
161                + " up in the keepalive state")
162   public long getKeepaliveCountTotal();
163
164   /**
165    * The total number of connections that have terminated with
166    * {@link com.caucho.vfs.ClientDisconnectException}.
167    */

168   @Description("The total number of connections that have"
169                + " terminated with a client disconnect")
170   public long getClientDisconnectCountTotal();
171
172   /**
173    * Returns the total duration in milliseconds that requests serviced by
174    * this port have taken.
175    */

176   @Description("The total duration in milliseconds that"
177                + " requests serviced by this service have taken")
178   @Units("milliseconds")
179   public long getRequestTimeTotal();
180
181   /**
182    * Returns the total number of bytes that requests serviced by this
183    * port have read.
184    */

185   @Description("The total number of bytes that requests"
186                + " serviced by this port have read")
187   @Units("milliseconds")
188   public long getReadBytesTotal();
189
190   /**
191    * Returns the total number of bytes that requests serviced by this
192    * port have written.
193    */

194   @Description("The total number of bytes that requests"
195                + " serviced by this port have written")
196   @Units("milliseconds")
197   public long getWriteBytesTotal();
198
199 }
200
Popular Tags