KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SOFA > SOFAnet > Transport > IOParams


1 /*
2  * IOParams.java
3  *
4  * Created on 31. bøezen 2004, 16:24
5  */

6
7 package SOFA.SOFAnet.Transport;
8
9 import SOFA.SOFAnet.Repository.Licence;
10 import java.util.*;
11
12 /**
13  * The object of this class serves as input/output parameters of the transport layer.
14  * @author Ladislav Sobr
15  */

16 public class IOParams
17 {
18   final static public int PRIORITY_DISTRIBUTION = 0;
19   final static public int PRIORITY_LOW = 0;
20   final static public int PRIORITY_INTERACTIVE = 1;
21   final static public int PRIORITY_HIGH = 1;
22   final static public int PRIORITY_BLOCKING = 2;
23   final static public int PRIORITY_CRITICAL = 2;
24   
25   public static class OtherNode
26   {
27     public String JavaDoc nodeName;
28     public Licence licence; //can be null
29
public int errCode;
30     
31     public OtherNode()
32     {
33       nodeName = "";
34       errCode = 0;
35     }
36   }
37
38   private String JavaDoc bundleName;
39   private BundleData bundleData; //can be null
40
private boolean offer;
41   private boolean address;
42   private boolean licenceOnly;
43   private int priority;
44   private String JavaDoc sourceNodeName;
45   private String JavaDoc addressNodeName;
46   private String JavaDoc contractID;
47
48   private String JavaDoc nodeName;
49   private Licence licence; //can be null
50
private int errCode;
51   
52   private List otherNodes;
53   
54   
55   /** Creates a new instance of IOParams */
56   public IOParams()
57   {
58   }
59   
60
61   public String JavaDoc getBundleName()
62   {
63     return bundleName;
64   }
65   
66   public String JavaDoc getNodeName()
67   {
68     return nodeName;
69   }
70   
71   public BundleData getBundleData()
72   {
73     return bundleData;
74   }
75   
76   public boolean isOffer()
77   {
78     return offer;
79   }
80   
81   public boolean isAddress()
82   {
83     return address;
84   }
85   
86   public boolean isLicenceOnly()
87   {
88     return licenceOnly;
89   }
90   
91   public int getPriority()
92   {
93     return priority;
94   }
95   
96   public Licence getLicence()
97   {
98     return licence;
99   }
100   
101   public int getErrCode()
102   {
103     return errCode;
104   }
105   
106   public List getOtherNodes()
107   {
108     return otherNodes;
109   }
110   
111   public String JavaDoc getSourceNodeName()
112   {
113     return sourceNodeName;
114   }
115   
116   public String JavaDoc getAddressNodeName()
117   {
118     return addressNodeName;
119   }
120   
121   public String JavaDoc getContractID()
122   {
123     return contractID;
124   }
125   
126   public void setBundleName(String JavaDoc bundleName)
127   {
128     this.bundleName = bundleName;
129   }
130   
131   public void setNodeName(String JavaDoc nodeName)
132   {
133     this.nodeName = nodeName;
134   }
135   
136   public void setBundleData(BundleData bundleData)
137   {
138     this.bundleData = bundleData;
139   }
140   
141   public void setOffer(boolean offer)
142   {
143     this.offer = offer;
144   }
145   
146   public void setAddress(boolean address)
147   {
148     this.address = address;
149   }
150   
151   public void setLicenceOnly(boolean licenceOnly)
152   {
153     this.licenceOnly = licenceOnly;
154   }
155   
156   public void setPriority(int priority)
157   {
158     this.priority = priority;
159   }
160   
161   public void setLicence(Licence licence)
162   {
163     this.licence = licence;
164   }
165   
166   public void setErrCode(int errCode)
167   {
168     this.errCode = errCode;
169   }
170   
171   public void setSourceNodeName(String JavaDoc sourceNodeName)
172   {
173     this.sourceNodeName = sourceNodeName;
174   }
175   
176   public void setAddressNodeName(String JavaDoc addressNodeName)
177   {
178     this.addressNodeName = addressNodeName;
179   }
180   
181   public void setContractID(String JavaDoc contractID)
182   {
183     this.contractID = contractID;
184   }
185   
186   public void setOtherNodes(List otherNodes)
187   {
188     this.otherNodes = otherNodes;
189   }
190   
191   public void addOtherNode(OtherNode otherNode)
192   {
193     otherNodes.add(otherNode);
194   }
195 }
196
Popular Tags