View Javadoc

1   /**********************************************************************
2    * EJConstants
3    * created on 27.02.2005 by netseeker
4    * $Source: /cvsroot/ejoe/EJOE/src/de/netseeker/ejoe/EJConstants.java,v $
5    * $Date: 2006/02/04 14:16:35 $
6    * $Revision: 1.21 $
7    *********************************************************************/
8   package de.netseeker.ejoe;
9   
10  /***
11   * @author netseeker
12   */
13  public final class EJConstants
14  {
15  	/*
16  	 * size used for nio header bytebuffers containing the size of the data
17  	 * buffers
18  	 */
19  	public static final int	NIO_HEADER_SIZE					= 4;
20  
21  	/*
22  	 * buffer size used for the bytbuffer outputstreams used by both client and
23  	 * server
24  	 */
25  	public static final int	NIO_BYTEBUFFER_STREAM_SIZE		= 512;
26  
27  	/*
28  	 * number of trials for write/read data before a socketchannel
29  	 * will be marked as blocking
30  	 */
31  	public static final int	NIO_MAX_ITERATIONS				= 3;
32  
33  	/*
34  	 * buffer size used for the BufferedInputStream, BufferedOutputStream as
35  	 * well as for (De)Compression streams
36  	 */
37  	public static final int	BUFFERED_STREAM_SIZE			= 1024;
38  
39  	/* the default port on which ejoe will bind the server socket */
40  	public static final int	EJOE_PORT						= 12577;
41  
42  	/*
43  	 * the default port on which ejoe will bind the server socket for remote
44  	 * classloading
45  	 */
46  	public static final int	EJOE_CLASSLOADER_PORT			= 12578;
47  
48  	/*
49  	 * the default amount of concurrent read and server handler operations EJOE
50  	 * will process simultaneously
51  	 */
52  	public static final int	EJOE_MAX_READPROCESSORS			= 20;
53  
54  	/*
55  	 * the default amount of concurrent socket write operations EJOE will
56  	 * process simultaneously
57  	 */
58  	public static final int	EJOE_MAX_WRITEPROCESSORS		= 10;
59  
60  	/*
61  	 * the timeout a Selector (either ConnectionAccessor or
62  	 * ConnectionProcessorManager) will block for select() operations
63  	 */
64  	public static final int	EJOE_SELECT_TIMEOUT				= 50;
65  
66  	/*
67  	 * the timeout used when EJOE clients are waiting for server responses or
68  	 * vice versa
69  	 */
70  	public static final int	EJOE_CONNECTION_TIMEOUT			= 150000;
71  
72  	/*
73  	 * the timeout used when EJOE will block before next selection call if the
74  	 * last selection was zero
75  	 */
76  	public static final int	EJOE_WAIT_CYCLE					= 100;
77  
78  	/*
79  	 * the timeout used when EJOE will block before next selection call if the
80  	 * last selection was zero
81  	 */
82  	public static final int	EJOE_WAIT_TIMEOUT				= 50;
83  
84  	public static final int	EJOE_MAX_SOCKET_BUF_SIZE		= 65536;
85  
86  	public static final int	EJOE_DEFAULT_SOCKET_BUF_SIZE	= 65536;
87  
88  	public final static int	IPTOS_LOWCOST					= 0x02;
89  
90  	public final static int	IPTOS_RELIABILITY				= 0x04;
91  
92  	public final static int	IPTOS_THROUGHPUT				= 0x08;
93  
94  	public final static int	IPTOS_LOWDELAY					= 0x10;
95  }