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