KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > net > protocol > transport > TestConnectionPolicy


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.net.protocol.transport;
5
6 public class TestConnectionPolicy implements ConnectionPolicy {
7
8   public int clientConnected;
9   public int clientDisconnected;
10   public boolean maxConnectionsExceeded;
11   public int maxConnections;
12   
13   public void clientConnected() {
14     clientConnected++;
15   }
16
17   public void clientDisconnected() {
18     clientDisconnected++;
19   }
20
21   public boolean maxConnectionsExceeded() {
22     return maxConnectionsExceeded;
23   }
24
25   public int getMaxConnections() {
26     return maxConnections;
27   }
28
29   public void setMaxConnections(int i) {
30     return;
31   }
32
33 }
34
Popular Tags