1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule.config; |
12 | |
|
13 | |
import org.mule.api.MuleContext; |
14 | |
import org.mule.api.config.MuleConfiguration; |
15 | |
import org.mule.api.config.MuleProperties; |
16 | |
import org.mule.api.context.MuleContextAware; |
17 | |
import org.mule.api.lifecycle.FatalException; |
18 | |
import org.mule.api.lifecycle.Initialisable; |
19 | |
import org.mule.api.lifecycle.Startable; |
20 | |
import org.mule.config.i18n.CoreMessages; |
21 | |
import org.mule.util.FileUtils; |
22 | |
import org.mule.util.NumberUtils; |
23 | |
import org.mule.util.StringUtils; |
24 | |
import org.mule.util.UUID; |
25 | |
|
26 | |
import java.net.InetAddress; |
27 | |
import java.net.UnknownHostException; |
28 | |
import java.nio.charset.Charset; |
29 | |
|
30 | |
import javax.xml.parsers.SAXParserFactory; |
31 | |
|
32 | |
import org.apache.commons.lang.BooleanUtils; |
33 | |
import org.apache.commons.logging.Log; |
34 | |
import org.apache.commons.logging.LogFactory; |
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
|
40 | |
public class DefaultMuleConfiguration implements MuleConfiguration, MuleContextAware |
41 | |
{ |
42 | |
|
43 | 0 | public static final String[] DEFAULT_STACKTRACE_FILTER = ( |
44 | |
"org.mule.processor.AbstractInterceptingMessageProcessor," + |
45 | |
"org.mule.processor.builder.InterceptingChainMessageProcessorBuilder") |
46 | |
.split(","); |
47 | |
|
48 | |
|
49 | |
|
50 | |
|
51 | |
|
52 | 0 | public static boolean fullStackTraces = false; |
53 | |
|
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | 0 | public static boolean verboseExceptions = false; |
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | 0 | public static String[] stackTraceFilter = DEFAULT_STACKTRACE_FILTER; |
67 | |
|
68 | 0 | private boolean synchronous = false; |
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | 0 | private String systemModelType = "seda"; |
75 | |
|
76 | 0 | private String encoding = "UTF-8"; |
77 | |
|
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | 0 | private int responseTimeout = 10000; |
83 | |
|
84 | |
|
85 | |
|
86 | |
|
87 | |
|
88 | 0 | private int defaultTransactionTimeout = 30000; |
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | 0 | private int defaultQueueTimeout = 200; |
94 | |
|
95 | |
|
96 | |
|
97 | |
|
98 | |
|
99 | 0 | private int shutdownTimeout = 5000; |
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | 0 | private String workingDirectory = "./.mule"; |
108 | |
|
109 | |
|
110 | |
|
111 | |
|
112 | |
|
113 | 0 | private boolean clientMode = false; |
114 | |
|
115 | |
|
116 | |
private String id; |
117 | |
|
118 | |
|
119 | |
private String clusterId; |
120 | |
|
121 | |
|
122 | |
private String domainId; |
123 | |
|
124 | |
|
125 | |
|
126 | 0 | private boolean cacheMessageAsBytes = true; |
127 | |
|
128 | 0 | private boolean cacheMessageOriginalPayload = true; |
129 | |
|
130 | 0 | private boolean enableStreaming = true; |
131 | |
|
132 | 0 | private boolean autoWrapMessageAwareTransform = true; |
133 | |
|
134 | 0 | protected transient Log logger = LogFactory.getLog(DefaultMuleConfiguration.class); |
135 | |
|
136 | |
private MuleContext muleContext; |
137 | |
private boolean containerMode; |
138 | |
|
139 | |
|
140 | |
|
141 | |
|
142 | |
|
143 | |
|
144 | |
|
145 | 0 | private boolean validateExpressions = true; |
146 | |
|
147 | |
|
148 | |
public DefaultMuleConfiguration() |
149 | |
{ |
150 | 0 | this(false); |
151 | 0 | } |
152 | |
|
153 | |
public DefaultMuleConfiguration(boolean containerMode) |
154 | 0 | { |
155 | 0 | this.containerMode = containerMode; |
156 | |
|
157 | |
|
158 | 0 | applySystemProperties(); |
159 | |
|
160 | 0 | if (id == null) |
161 | |
{ |
162 | 0 | id = UUID.getUUID(); |
163 | |
} |
164 | |
|
165 | 0 | if (clusterId == null) |
166 | |
{ |
167 | 0 | clusterId = CoreMessages.notClustered().getMessage(); |
168 | |
} |
169 | |
|
170 | 0 | if (domainId == null) |
171 | |
{ |
172 | |
try |
173 | |
{ |
174 | 0 | domainId = InetAddress.getLocalHost().getHostName(); |
175 | |
} |
176 | 0 | catch (UnknownHostException e) |
177 | |
{ |
178 | 0 | logger.warn(e); |
179 | 0 | domainId = "org.mule"; |
180 | 0 | } |
181 | |
} |
182 | |
|
183 | |
try |
184 | |
{ |
185 | 0 | validateEncoding(); |
186 | 0 | validateXML(); |
187 | |
} |
188 | 0 | catch (FatalException e) |
189 | |
{ |
190 | 0 | throw new RuntimeException(e); |
191 | 0 | } |
192 | 0 | } |
193 | |
|
194 | |
public void setMuleContext(MuleContext context) |
195 | |
{ |
196 | 0 | this.muleContext = context; |
197 | 0 | if (containerMode) |
198 | |
{ |
199 | |
|
200 | 0 | this.workingDirectory = String.format("%s/%s", getWorkingDirectory(), getId()); |
201 | |
} |
202 | 0 | } |
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
protected void applySystemProperties() |
208 | |
{ |
209 | |
String p; |
210 | |
|
211 | 0 | p = System.getProperty(MuleProperties.MULE_ENCODING_SYSTEM_PROPERTY); |
212 | 0 | if (p != null) |
213 | |
{ |
214 | 0 | encoding = p; |
215 | |
} |
216 | |
else |
217 | |
{ |
218 | 0 | System.setProperty(MuleProperties.MULE_ENCODING_SYSTEM_PROPERTY, encoding); |
219 | |
} |
220 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "endpoints.synchronous"); |
221 | 0 | if (p != null) |
222 | |
{ |
223 | 0 | synchronous = BooleanUtils.toBoolean(p); |
224 | |
} |
225 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "systemModelType"); |
226 | 0 | if (p != null) |
227 | |
{ |
228 | 0 | systemModelType = p; |
229 | |
} |
230 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "timeout.synchronous"); |
231 | 0 | if (p != null) |
232 | |
{ |
233 | 0 | responseTimeout = NumberUtils.toInt(p); |
234 | |
} |
235 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "timeout.transaction"); |
236 | 0 | if (p != null) |
237 | |
{ |
238 | 0 | defaultTransactionTimeout = NumberUtils.toInt(p); |
239 | |
} |
240 | |
|
241 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "workingDirectory"); |
242 | 0 | if (p != null) |
243 | |
{ |
244 | 0 | workingDirectory = p; |
245 | |
} |
246 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "clientMode"); |
247 | 0 | if (p != null) |
248 | |
{ |
249 | 0 | clientMode = BooleanUtils.toBoolean(p); |
250 | |
} |
251 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "serverId"); |
252 | 0 | if (p != null) |
253 | |
{ |
254 | 0 | id = p; |
255 | |
} |
256 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "clusterId"); |
257 | 0 | if (p != null) |
258 | |
{ |
259 | 0 | clusterId = p; |
260 | |
} |
261 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "domainId"); |
262 | 0 | if (p != null) |
263 | |
{ |
264 | 0 | domainId = p; |
265 | |
} |
266 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "message.cacheBytes"); |
267 | 0 | if (p != null) |
268 | |
{ |
269 | 0 | cacheMessageAsBytes = BooleanUtils.toBoolean(p); |
270 | |
} |
271 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "message.cacheOriginal"); |
272 | 0 | if (p != null) |
273 | |
{ |
274 | 0 | cacheMessageOriginalPayload = BooleanUtils.toBoolean(p); |
275 | |
} |
276 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "streaming.enable"); |
277 | 0 | if (p != null) |
278 | |
{ |
279 | 0 | enableStreaming = BooleanUtils.toBoolean(p); |
280 | |
} |
281 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "transform.autoWrap"); |
282 | 0 | if (p != null) |
283 | |
{ |
284 | 0 | autoWrapMessageAwareTransform = BooleanUtils.toBoolean(p); |
285 | |
} |
286 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "stacktrace.full"); |
287 | 0 | if (p != null) |
288 | |
{ |
289 | 0 | fullStackTraces = false; |
290 | |
} |
291 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "stacktrace.filter"); |
292 | 0 | if (p != null) |
293 | |
{ |
294 | 0 | stackTraceFilter = p.split(","); |
295 | |
} |
296 | |
|
297 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "verbose.exceptions"); |
298 | 0 | if (p != null) |
299 | |
{ |
300 | 0 | verboseExceptions = BooleanUtils.toBoolean(p); |
301 | |
} |
302 | |
else |
303 | |
{ |
304 | 0 | verboseExceptions = logger.isDebugEnabled(); |
305 | |
} |
306 | |
|
307 | 0 | p = System.getProperty(MuleProperties.SYSTEM_PROPERTY_PREFIX + "validate.expressions"); |
308 | 0 | if (p != null) |
309 | |
{ |
310 | 0 | validateExpressions = Boolean.valueOf(p); |
311 | |
} |
312 | 0 | } |
313 | |
|
314 | |
protected void validateEncoding() throws FatalException |
315 | |
{ |
316 | |
|
317 | 0 | if (!Charset.isSupported(encoding)) |
318 | |
{ |
319 | 0 | throw new FatalException(CoreMessages.propertyHasInvalidValue("encoding", encoding), this); |
320 | |
} |
321 | 0 | } |
322 | |
|
323 | |
|
324 | |
|
325 | |
|
326 | |
|
327 | |
|
328 | |
|
329 | |
|
330 | |
|
331 | |
|
332 | |
|
333 | |
protected void validateXML() throws FatalException |
334 | |
{ |
335 | 0 | SAXParserFactory f = SAXParserFactory.newInstance(); |
336 | 0 | if (f == null || f.getClass().getName().indexOf("crimson") != -1) |
337 | |
{ |
338 | 0 | throw new FatalException(CoreMessages.valueIsInvalidFor(f.getClass().getName(), |
339 | |
"javax.xml.parsers.SAXParserFactory"), this); |
340 | |
} |
341 | 0 | } |
342 | |
|
343 | |
public void setDefaultSynchronousEndpoints(boolean synchronous) |
344 | |
{ |
345 | 0 | if (verifyContextNotStarted()) |
346 | |
{ |
347 | 0 | this.synchronous = synchronous; |
348 | |
} |
349 | 0 | } |
350 | |
|
351 | |
public int getDefaultResponseTimeout() |
352 | |
{ |
353 | 0 | return responseTimeout; |
354 | |
} |
355 | |
|
356 | |
public void setDefaultResponseTimeout(int responseTimeout) |
357 | |
{ |
358 | 0 | if (verifyContextNotStarted()) |
359 | |
{ |
360 | 0 | this.responseTimeout = responseTimeout; |
361 | |
} |
362 | 0 | } |
363 | |
|
364 | |
public String getWorkingDirectory() |
365 | |
{ |
366 | 0 | return workingDirectory; |
367 | |
} |
368 | |
|
369 | |
public String getMuleHomeDirectory() |
370 | |
{ |
371 | 0 | return System.getProperty(MuleProperties.MULE_HOME_DIRECTORY_PROPERTY); |
372 | |
} |
373 | |
|
374 | |
public void setWorkingDirectory(String workingDirectory) |
375 | |
{ |
376 | 0 | if (verifyContextNotInitialized()) |
377 | |
{ |
378 | |
|
379 | 0 | this.workingDirectory = FileUtils.newFile(workingDirectory).getAbsolutePath().replaceAll("\\\\", "/"); |
380 | |
} |
381 | 0 | } |
382 | |
|
383 | |
public int getDefaultTransactionTimeout() |
384 | |
{ |
385 | 0 | return defaultTransactionTimeout; |
386 | |
} |
387 | |
|
388 | |
public void setDefaultTransactionTimeout(int defaultTransactionTimeout) |
389 | |
{ |
390 | 0 | if (verifyContextNotStarted()) |
391 | |
{ |
392 | 0 | this.defaultTransactionTimeout = defaultTransactionTimeout; |
393 | |
} |
394 | 0 | } |
395 | |
|
396 | |
|
397 | |
public boolean isValidateExpressions() |
398 | |
{ |
399 | 0 | return validateExpressions; |
400 | |
} |
401 | |
|
402 | |
public boolean isClientMode() |
403 | |
{ |
404 | 0 | return clientMode; |
405 | |
} |
406 | |
|
407 | |
public String getDefaultEncoding() |
408 | |
{ |
409 | 0 | return encoding; |
410 | |
} |
411 | |
|
412 | |
public void setDefaultEncoding(String encoding) |
413 | |
{ |
414 | 0 | if (verifyContextNotInitialized()) |
415 | |
{ |
416 | 0 | this.encoding = encoding; |
417 | |
} |
418 | 0 | } |
419 | |
|
420 | |
public String getId() |
421 | |
{ |
422 | 0 | return id; |
423 | |
} |
424 | |
|
425 | |
public void setId(String id) |
426 | |
{ |
427 | 0 | if (verifyContextNotInitialized()) |
428 | |
{ |
429 | 0 | if (StringUtils.isBlank(id)) |
430 | |
{ |
431 | 0 | throw new IllegalArgumentException("Cannot set server id to null/blank"); |
432 | |
} |
433 | 0 | this.id = id; |
434 | |
} |
435 | 0 | } |
436 | |
|
437 | |
public String getClusterId() |
438 | |
{ |
439 | 0 | return clusterId; |
440 | |
} |
441 | |
|
442 | |
public void setClusterId(String clusterId) |
443 | |
{ |
444 | 0 | if (verifyContextNotInitialized()) |
445 | |
{ |
446 | 0 | this.clusterId = clusterId; |
447 | |
} |
448 | 0 | } |
449 | |
|
450 | |
public String getDomainId() |
451 | |
{ |
452 | 0 | return domainId; |
453 | |
} |
454 | |
|
455 | |
public void setDomainId(String domainId) |
456 | |
{ |
457 | 0 | if (verifyContextNotInitialized()) |
458 | |
{ |
459 | 0 | this.domainId = domainId; |
460 | |
} |
461 | 0 | } |
462 | |
|
463 | |
public String getSystemModelType() |
464 | |
{ |
465 | 0 | return systemModelType; |
466 | |
} |
467 | |
|
468 | |
public void setSystemModelType(String systemModelType) |
469 | |
{ |
470 | 0 | if (verifyContextNotStarted()) |
471 | |
{ |
472 | 0 | this.systemModelType = systemModelType; |
473 | |
} |
474 | 0 | } |
475 | |
|
476 | |
public void setClientMode(boolean clientMode) |
477 | |
{ |
478 | 0 | if (verifyContextNotStarted()) |
479 | |
{ |
480 | 0 | this.clientMode = clientMode; |
481 | |
} |
482 | 0 | } |
483 | |
|
484 | |
public String getSystemName() |
485 | |
{ |
486 | 0 | return domainId + "." + clusterId + "." + id; |
487 | |
} |
488 | |
|
489 | |
public boolean isAutoWrapMessageAwareTransform() |
490 | |
{ |
491 | 0 | return autoWrapMessageAwareTransform; |
492 | |
} |
493 | |
|
494 | |
public void setAutoWrapMessageAwareTransform(boolean autoWrapMessageAwareTransform) |
495 | |
{ |
496 | 0 | if (verifyContextNotStarted()) |
497 | |
{ |
498 | 0 | this.autoWrapMessageAwareTransform = autoWrapMessageAwareTransform; |
499 | |
} |
500 | 0 | } |
501 | |
|
502 | |
public boolean isCacheMessageAsBytes() |
503 | |
{ |
504 | 0 | return cacheMessageAsBytes; |
505 | |
} |
506 | |
|
507 | |
public void setCacheMessageAsBytes(boolean cacheMessageAsBytes) |
508 | |
{ |
509 | 0 | if (verifyContextNotStarted()) |
510 | |
{ |
511 | 0 | this.cacheMessageAsBytes = cacheMessageAsBytes; |
512 | |
} |
513 | 0 | } |
514 | |
|
515 | |
public boolean isCacheMessageOriginalPayload() |
516 | |
{ |
517 | 0 | return cacheMessageOriginalPayload; |
518 | |
} |
519 | |
|
520 | |
public void setCacheMessageOriginalPayload(boolean cacheMessageOriginalPayload) |
521 | |
{ |
522 | 0 | if (verifyContextNotStarted()) |
523 | |
{ |
524 | 0 | this.cacheMessageOriginalPayload = cacheMessageOriginalPayload; |
525 | |
} |
526 | 0 | } |
527 | |
|
528 | |
public boolean isEnableStreaming() |
529 | |
{ |
530 | 0 | return enableStreaming; |
531 | |
} |
532 | |
|
533 | |
public void setEnableStreaming(boolean enableStreaming) |
534 | |
{ |
535 | 0 | if (verifyContextNotStarted()) |
536 | |
{ |
537 | 0 | this.enableStreaming = enableStreaming; |
538 | |
} |
539 | 0 | } |
540 | |
|
541 | |
protected boolean verifyContextNotInitialized() |
542 | |
{ |
543 | 0 | if (muleContext != null && muleContext.getLifecycleManager().isPhaseComplete(Initialisable.PHASE_NAME)) |
544 | |
{ |
545 | 0 | logger.warn("Cannot modify MuleConfiguration once the MuleContext has been initialized. Modification will be ignored."); |
546 | 0 | return false; |
547 | |
} |
548 | |
else |
549 | |
{ |
550 | 0 | return true; |
551 | |
} |
552 | |
} |
553 | |
|
554 | |
protected boolean verifyContextNotStarted() |
555 | |
{ |
556 | 0 | if (muleContext != null && muleContext.getLifecycleManager().isPhaseComplete(Startable.PHASE_NAME)) |
557 | |
{ |
558 | 0 | logger.warn("Cannot modify MuleConfiguration once the MuleContext has been started. Modification will be ignored."); |
559 | 0 | return false; |
560 | |
} |
561 | |
else |
562 | |
{ |
563 | 0 | return true; |
564 | |
} |
565 | |
} |
566 | |
|
567 | |
public int getDefaultQueueTimeout() |
568 | |
{ |
569 | 0 | return defaultQueueTimeout; |
570 | |
} |
571 | |
|
572 | |
public void setDefaultQueueTimeout(int defaultQueueTimeout) |
573 | |
{ |
574 | 0 | if (verifyContextNotStarted()) |
575 | |
{ |
576 | 0 | this.defaultQueueTimeout = defaultQueueTimeout; |
577 | |
} |
578 | 0 | } |
579 | |
|
580 | |
public int getShutdownTimeout() |
581 | |
{ |
582 | 0 | return shutdownTimeout; |
583 | |
} |
584 | |
|
585 | |
public void setShutdownTimeout(int shutdownTimeout) |
586 | |
{ |
587 | 0 | if (verifyContextNotStarted()) |
588 | |
{ |
589 | 0 | this.shutdownTimeout = shutdownTimeout; |
590 | |
} |
591 | 0 | } |
592 | |
|
593 | |
public boolean isContainerMode() |
594 | |
{ |
595 | 0 | return this.containerMode; |
596 | |
} |
597 | |
|
598 | |
@Override |
599 | |
public int hashCode() |
600 | |
{ |
601 | 0 | final int prime = 31; |
602 | 0 | int result = 1; |
603 | 0 | result = prime * result + (autoWrapMessageAwareTransform ? 1231 : 1237); |
604 | 0 | result = prime * result + (cacheMessageAsBytes ? 1231 : 1237); |
605 | 0 | result = prime * result + (cacheMessageOriginalPayload ? 1231 : 1237); |
606 | 0 | result = prime * result + (clientMode ? 1231 : 1237); |
607 | 0 | result = prime * result + ((clusterId == null) ? 0 : clusterId.hashCode()); |
608 | 0 | result = prime * result + defaultQueueTimeout; |
609 | 0 | result = prime * result + defaultTransactionTimeout; |
610 | 0 | result = prime * result + ((domainId == null) ? 0 : domainId.hashCode()); |
611 | 0 | result = prime * result + (enableStreaming ? 1231 : 1237); |
612 | 0 | result = prime * result + ((encoding == null) ? 0 : encoding.hashCode()); |
613 | 0 | result = prime * result + ((id == null) ? 0 : id.hashCode()); |
614 | 0 | result = prime * result + responseTimeout; |
615 | 0 | result = prime * result + shutdownTimeout; |
616 | 0 | result = prime * result + (synchronous ? 1231 : 1237); |
617 | 0 | result = prime * result + ((systemModelType == null) ? 0 : systemModelType.hashCode()); |
618 | 0 | result = prime * result + ((workingDirectory == null) ? 0 : workingDirectory.hashCode()); |
619 | 0 | result = prime * result + (containerMode ? 1231 : 1237); |
620 | 0 | return result; |
621 | |
} |
622 | |
|
623 | |
@Override |
624 | |
public boolean equals(Object obj) |
625 | |
{ |
626 | 0 | if (this == obj) return true; |
627 | 0 | if (obj == null) return false; |
628 | 0 | if (getClass() != obj.getClass()) return false; |
629 | 0 | DefaultMuleConfiguration other = (DefaultMuleConfiguration) obj; |
630 | 0 | if (autoWrapMessageAwareTransform != other.autoWrapMessageAwareTransform) return false; |
631 | 0 | if (cacheMessageAsBytes != other.cacheMessageAsBytes) return false; |
632 | 0 | if (cacheMessageOriginalPayload != other.cacheMessageOriginalPayload) return false; |
633 | 0 | if (clientMode != other.clientMode) return false; |
634 | 0 | if (clusterId == null) |
635 | |
{ |
636 | 0 | if (other.clusterId != null) return false; |
637 | |
} |
638 | 0 | else if (!clusterId.equals(other.clusterId)) return false; |
639 | 0 | if (defaultQueueTimeout != other.defaultQueueTimeout) return false; |
640 | 0 | if (defaultTransactionTimeout != other.defaultTransactionTimeout) return false; |
641 | 0 | if (domainId == null) |
642 | |
{ |
643 | 0 | if (other.domainId != null) return false; |
644 | |
} |
645 | 0 | else if (!domainId.equals(other.domainId)) return false; |
646 | 0 | if (enableStreaming != other.enableStreaming) return false; |
647 | 0 | if (encoding == null) |
648 | |
{ |
649 | 0 | if (other.encoding != null) return false; |
650 | |
} |
651 | 0 | else if (!encoding.equals(other.encoding)) return false; |
652 | 0 | if (id == null) |
653 | |
{ |
654 | 0 | if (other.id != null) return false; |
655 | |
} |
656 | 0 | else if (!id.equals(other.id)) return false; |
657 | 0 | if (responseTimeout != other.responseTimeout) return false; |
658 | 0 | if (shutdownTimeout != other.shutdownTimeout) return false; |
659 | 0 | if (synchronous != other.synchronous) return false; |
660 | 0 | if (systemModelType == null) |
661 | |
{ |
662 | 0 | if (other.systemModelType != null) return false; |
663 | |
} |
664 | 0 | else if (!systemModelType.equals(other.systemModelType)) return false; |
665 | 0 | if (workingDirectory == null) |
666 | |
{ |
667 | 0 | if (other.workingDirectory != null) return false; |
668 | |
} |
669 | 0 | else if (!workingDirectory.equals(other.workingDirectory)) return false; |
670 | |
|
671 | 0 | if (containerMode != other.containerMode) return false; |
672 | |
|
673 | 0 | return true; |
674 | |
} |
675 | |
|
676 | |
} |