KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > corba > se > impl > transport > ReadTCPTimeoutsImpl


1 /*
2  * @(#)ReadTCPTimeoutsImpl.java 1.3 04/07/26
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package com.sun.corba.se.impl.transport;
9
10 import com.sun.corba.se.spi.transport.ReadTimeouts;
11
12 /**
13  * @author Charlie Hunt
14  */

15 public class ReadTCPTimeoutsImpl implements ReadTimeouts
16 {
17     private int initial_time_to_wait;
18     private int max_time_to_wait;
19     private int max_giop_header_time_to_wait;
20     private double backoff_factor;
21
22     // constructor
23
public ReadTCPTimeoutsImpl(int initial_time,
24                         int max_time,
25                 int max_giop_header_time,
26                 int backoff_percent) {
27     this.initial_time_to_wait = initial_time;
28     this.max_time_to_wait = max_time;
29     this.max_giop_header_time_to_wait = max_giop_header_time;
30     this.backoff_factor = 1 + (double)(backoff_percent)/100;
31     }
32
33     public int get_initial_time_to_wait() { return initial_time_to_wait; }
34     public int get_max_time_to_wait() { return max_time_to_wait; }
35     public double get_backoff_factor() { return backoff_factor; }
36     public int get_max_giop_header_time_to_wait() {
37     return max_giop_header_time_to_wait; }
38 }
39
40 // End of file.
41
Popular Tags