001: // Copyright (c) 2004-2005 Sun Microsystems Inc., All Rights Reserved.
002:
003: /*
004: * ServiceBean.java
005: *
006: * SUN PROPRIETARY/CONFIDENTIAL
007: * This software is the proprietary information of Sun Microsystems, Inc.
008: * Use is subject to license term
009: */
010: package com.sun.jbi.engine.sequencing.servicelist;
011:
012: import javax.jbi.servicedesc.ServiceEndpoint;
013:
014: /**
015: * Class ServiceBean.
016: *
017: * @author Sun Microsystems, Inc.
018: */
019: public class ServiceBean implements java.io.Serializable {
020: /**
021: * Default timeout
022: */
023: private static final long DEFAULT_TIMEOUT = 5000;
024:
025: /**
026: * Service reference.
027: */
028: private ServiceEndpoint mServiceReference;
029:
030: /**
031: * Field mDescription
032: */
033: private java.lang.String mDescription;
034:
035: /**
036: * Endpoint name
037: */
038: private String mEndpointName;
039:
040: /**
041: * Interface name.
042: */
043: private String mInterfaceName;
044:
045: /**
046: * Interface namespace.
047: */
048: private String mInterfaceNamespace;
049:
050: /**
051: * Message exchange pattern.
052: */
053: private String mMep;
054:
055: /**
056: * Field mName
057: */
058: private java.lang.String mName;
059:
060: /**
061: * Namespace URI
062: */
063: private String mNamespace;
064:
065: /**
066: * Field mOperation
067: */
068: private java.lang.String mOperation;
069:
070: /**
071: * Operation namespace
072: */
073: private String mOperationNamespace;
074:
075: /**
076: * Field mServiceId
077: */
078: private java.lang.String mServiceId;
079:
080: /**
081: * Keeps track of state for field: mTimeout
082: */
083: private boolean mHasTimeout;
084:
085: /**
086: * Field mTimeout
087: */
088: private long mTimeout = DEFAULT_TIMEOUT;
089:
090: /**
091: * Creates a new ServiceBean object.
092: */
093: public ServiceBean() {
094: super ();
095: }
096:
097: /**
098: * Sets the value of field 'description'.
099: *
100: * @param description the value of field 'description'.
101: */
102: public void setDescription(java.lang.String description) {
103: this .mDescription = description;
104: }
105:
106: /**
107: * Returns the value of field 'description'.
108: *
109: * @return the value of field 'description'.
110: */
111: public java.lang.String getDescription() {
112: return this .mDescription;
113: }
114:
115: /**
116: * Sets the endpoint name.
117: *
118: * @param name endpoint name
119: */
120: public void setEndpointName(String name) {
121: mEndpointName = name;
122: }
123:
124: /**
125: * Gets the endpoint name.
126: *
127: * @return endpoint name
128: */
129: public String getEndpointName() {
130: return mEndpointName;
131: }
132:
133: /**
134: * Setter for property mInterfaceName.
135: *
136: * @param mInterfaceName New value of property mInterfaceName.
137: */
138: public void setInterfaceName(java.lang.String mInterfaceName) {
139: this .mInterfaceName = mInterfaceName;
140: }
141:
142: /**
143: * Getter for property mInterfaceName.
144: *
145: * @return Value of property mInterfaceName.
146: */
147: public java.lang.String getInterfaceName() {
148: return mInterfaceName;
149: }
150:
151: /**
152: * Setter for property mInterfaceNamespace.
153: *
154: * @param mInterfaceNamespace New value of property mInterfaceNamespace.
155: */
156: public void setInterfaceNamespace(
157: java.lang.String mInterfaceNamespace) {
158: this .mInterfaceNamespace = mInterfaceNamespace;
159: }
160:
161: /**
162: * Getter for property mInterfaceNamespace.
163: *
164: * @return Value of property mInterfaceNamespace.
165: */
166: public java.lang.String getInterfaceNamespace() {
167: return mInterfaceNamespace;
168: }
169:
170: /**
171: * Sets the MEP.
172: *
173: * @param mep mep
174: */
175: public void setMep(String mep) {
176: mMep = mep;
177: }
178:
179: /**
180: * Gets the MEP.
181: *
182: * @return mep
183: */
184: public String getMep() {
185: return mMep;
186: }
187:
188: /**
189: * Sets the value of field 'name'.
190: *
191: * @param name the value of field 'name'.
192: */
193: public void setName(java.lang.String name) {
194: this .mName = name;
195: }
196:
197: /**
198: * Returns the value of field 'name'.
199: *
200: * @return the value of field 'name'.
201: */
202: public java.lang.String getName() {
203: return this .mName;
204: }
205:
206: /**
207: * Sets the value of field 'namespace'.
208: *
209: * @param namespace the value of field 'namespace'.
210: */
211: public void setNamespace(java.lang.String namespace) {
212: this .mNamespace = namespace;
213: }
214:
215: /**
216: * Gets the value of field 'namespace'.
217: *
218: * @return namespace name
219: */
220: public String getNamespace() {
221: return mNamespace;
222: }
223:
224: /**
225: * Sets the value of field 'operation'.
226: *
227: * @param operation the value of field 'operation'.
228: */
229: public void setOperation(java.lang.String operation) {
230: this .mOperation = operation;
231: }
232:
233: /**
234: * Returns the value of field 'operation'.
235: *
236: * @return the value of field 'operation'.
237: */
238: public java.lang.String getOperation() {
239: return this .mOperation;
240: }
241:
242: /**
243: * Sets the value of field 'operation'.
244: *
245: * @param operationnamespace the value of field 'operation'.
246: */
247: public void setOperationNamespace(
248: java.lang.String operationnamespace) {
249: this .mOperationNamespace = operationnamespace;
250: }
251:
252: /**
253: * Returns the value of field 'operation'.
254: *
255: * @return the value of field 'operation'.
256: */
257: public java.lang.String getOperationNamespace() {
258: return this .mOperationNamespace;
259: }
260:
261: /**
262: * Sets the service reference.
263: *
264: * @param ref service reference
265: */
266: public void setServiceReference(ServiceEndpoint ref) {
267: mServiceReference = ref;
268: }
269:
270: /**
271: * Gets the service reference.
272: *
273: * @return service ref
274: */
275: public ServiceEndpoint getServiceReference() {
276: return mServiceReference;
277: }
278:
279: /**
280: * Sets the value of field 'serviceid'.
281: *
282: * @param serviceid the value of field 'serviceid'.
283: */
284: public void setServiceid(java.lang.String serviceid) {
285: this .mServiceId = serviceid;
286: }
287:
288: /**
289: * Returns the value of field 'serviceid'.
290: *
291: * @return the value of field 'serviceid'.
292: */
293: public java.lang.String getServiceid() {
294: return this .mServiceId;
295: }
296:
297: /**
298: * Sets the value of field 'timeout'.
299: *
300: * @param timeout the value of field 'timeout'.
301: */
302: public void setTimeout(long timeout) {
303: this .mTimeout = timeout;
304: this .mHasTimeout = true;
305: }
306:
307: /**
308: * Returns the value of field 'timeout'.
309: *
310: * @return the value of field 'timeout'.
311: */
312: public long getTimeout() {
313: return this .mTimeout;
314: }
315:
316: /**
317: * Method deleteTimeout.
318: */
319: public void deleteTimeout() {
320: this .mHasTimeout = false;
321: }
322:
323: /**
324: * Method hasTimeout.
325: *
326: * @return true if it has timed out.
327: */
328: public boolean hasTimeout() {
329: return this.mHasTimeout;
330: }
331: }
|