KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > scalagent > kjoram > FactoryParameters


1 /*
2  * JORAM: Java(TM) Open Reliable Asynchronous Messaging
3  * Copyright (C) 2001 - ScalAgent Distributed Technologies
4  * Copyright (C) 1996 - Dyade
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA.
20  *
21  * Initial developer(s): Frederic Maistre (INRIA)
22  * Contributor(s): Nicolas Tachker (ScalAgent)
23  */

24 package com.scalagent.kjoram;
25
26 /**
27  * A <code>FactoryParameters</code> instance holds a
28  * <code>&lt;XA&gt;ConnectionFactory</code> configuration parameters.
29  */

30 public class FactoryParameters
31 {
32   /** Name of host hosting the server to create connections with. */
33   private String JavaDoc host;
34   /** Port to be used for accessing the server. */
35   private int port;
36
37   /**
38    * Duration in seconds during which connecting is attempted (connecting
39    * might take time if the server is temporarily not reachable); the 0 value
40    * is set for connecting only once and aborting if connecting failed.
41    */

42   public int connectingTimer = 0;
43   /**
44    * Duration in seconds during which a JMS transacted (non XA) session might
45    * be pending; above that duration the session is rolled back and closed;
46    * the 0 value means "no timer".
47    */

48   public int txPendingTimer = 0;
49   /**
50    * Duration in seconds during which a SOAP connection might pending server
51    * side considered as dead (0 for never); a SOAP connections is pending
52    * server side when a client does not properly disconnect.
53    */

54   public int soapCnxPendingTimer = 0;
55
56
57   /**
58    * Constructs a <code>FactoryParameters</code> instance.
59    *
60    * @param host Name of host hosting the server to create connections with.
61    * @param port Port to be used for accessing the server.
62    */

63   public FactoryParameters(String JavaDoc host, int port)
64   {
65     this.host = host;
66     this.port = port;
67   }
68
69
70   /**
71    * Returns the name of host hosting the server to create connections with.
72    */

73   public String JavaDoc getHost()
74   {
75     return host;
76   }
77
78   /** Returns the port to be used for accessing the server. */
79   public int getPort()
80   {
81     return port;
82   }
83 }
84
Popular Tags