1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
package org.mule; |
12 | |
|
13 | |
import org.mule.api.DefaultMuleException; |
14 | |
import org.mule.api.MuleContext; |
15 | |
import org.mule.api.MuleEvent; |
16 | |
import org.mule.api.MuleException; |
17 | |
import org.mule.api.MuleMessage; |
18 | |
import org.mule.api.MuleSession; |
19 | |
import org.mule.api.ThreadSafeAccess; |
20 | |
import org.mule.api.config.MuleProperties; |
21 | |
import org.mule.api.construct.FlowConstruct; |
22 | |
import org.mule.api.endpoint.EndpointBuilder; |
23 | |
import org.mule.api.endpoint.EndpointURI; |
24 | |
import org.mule.api.endpoint.ImmutableEndpoint; |
25 | |
import org.mule.api.endpoint.InboundEndpoint; |
26 | |
import org.mule.api.registry.ServiceType; |
27 | |
import org.mule.api.security.Credentials; |
28 | |
import org.mule.api.transformer.DataType; |
29 | |
import org.mule.api.transformer.Transformer; |
30 | |
import org.mule.api.transformer.TransformerException; |
31 | |
import org.mule.config.i18n.CoreMessages; |
32 | |
import org.mule.endpoint.DefaultEndpointFactory; |
33 | |
import org.mule.endpoint.MuleEndpointURI; |
34 | |
import org.mule.security.MuleCredentials; |
35 | |
import org.mule.session.DefaultMuleSession; |
36 | |
import org.mule.transformer.types.DataTypeFactory; |
37 | |
import org.mule.transport.service.TransportServiceDescriptor; |
38 | |
import org.mule.util.UUID; |
39 | |
import org.mule.util.store.DeserializationPostInitialisable; |
40 | |
|
41 | |
import java.io.IOException; |
42 | |
import java.io.ObjectInputStream; |
43 | |
import java.io.ObjectOutputStream; |
44 | |
import java.io.OutputStream; |
45 | |
import java.util.EventObject; |
46 | |
import java.util.HashMap; |
47 | |
import java.util.Iterator; |
48 | |
import java.util.LinkedList; |
49 | |
import java.util.List; |
50 | |
import java.util.Map; |
51 | |
|
52 | |
import org.apache.commons.logging.Log; |
53 | |
import org.apache.commons.logging.LogFactory; |
54 | |
|
55 | |
|
56 | |
|
57 | |
|
58 | |
|
59 | |
|
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
public class DefaultMuleEvent extends EventObject implements MuleEvent, ThreadSafeAccess, DeserializationPostInitialisable |
65 | |
{ |
66 | |
|
67 | |
|
68 | |
|
69 | |
private static final long serialVersionUID = 1L; |
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | 0 | protected transient Log logger = LogFactory.getLog(getClass()); |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | 0 | private transient ImmutableEndpoint endpoint = null; |
80 | |
|
81 | |
|
82 | |
|
83 | |
|
84 | 0 | private String id = null; |
85 | |
|
86 | |
|
87 | |
|
88 | |
|
89 | 0 | private MuleMessage message = null; |
90 | |
|
91 | |
private MuleSession session; |
92 | |
|
93 | 0 | private boolean stopFurtherProcessing = false; |
94 | |
|
95 | 0 | private int timeout = TIMEOUT_NOT_SET_VALUE; |
96 | |
|
97 | 0 | private transient ResponseOutputStream outputStream = null; |
98 | |
|
99 | 0 | private transient Object transformedMessage = null; |
100 | |
|
101 | 0 | private Credentials credentials = null; |
102 | |
|
103 | 0 | protected String[] ignoredPropertyOverrides = new String[]{MuleProperties.MULE_METHOD_PROPERTY}; |
104 | |
|
105 | 0 | private transient Map<String, Object> serializedData = null; |
106 | |
|
107 | |
|
108 | |
|
109 | |
|
110 | |
|
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
|
116 | |
|
117 | |
public DefaultMuleEvent(MuleMessage message, |
118 | |
ImmutableEndpoint endpoint, |
119 | |
FlowConstruct service, |
120 | |
MuleEvent previousEvent) |
121 | |
{ |
122 | 0 | super(message.getPayload()); |
123 | 0 | this.message = message; |
124 | 0 | this.id = generateEventId(); |
125 | 0 | this.session = previousEvent.getSession(); |
126 | 0 | ((DefaultMuleSession) session).setFlowConstruct(service); |
127 | 0 | this.endpoint = endpoint; |
128 | 0 | this.timeout = previousEvent.getTimeout(); |
129 | 0 | this.outputStream = (ResponseOutputStream) previousEvent.getOutputStream(); |
130 | 0 | fillProperties(previousEvent); |
131 | 0 | } |
132 | |
|
133 | |
public DefaultMuleEvent(MuleMessage message, |
134 | |
ImmutableEndpoint endpoint, |
135 | |
MuleSession session) |
136 | |
{ |
137 | 0 | this(message, endpoint, session, null); |
138 | 0 | } |
139 | |
|
140 | |
public DefaultMuleEvent(MuleMessage message, |
141 | |
ImmutableEndpoint endpoint, |
142 | |
MuleSession session, |
143 | |
ResponseOutputStream outputStream) |
144 | |
{ |
145 | 0 | super(message.getPayload()); |
146 | 0 | this.message = message; |
147 | 0 | this.endpoint = endpoint; |
148 | 0 | this.session = session; |
149 | 0 | this.id = generateEventId(); |
150 | 0 | this.outputStream = outputStream; |
151 | 0 | fillProperties(null); |
152 | 0 | } |
153 | |
|
154 | |
|
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
|
160 | |
|
161 | |
public DefaultMuleEvent(MuleMessage message, MuleEvent rewriteEvent) |
162 | |
{ |
163 | 0 | super(message.getPayload()); |
164 | 0 | this.message = message; |
165 | 0 | this.id = rewriteEvent.getId(); |
166 | 0 | this.session = rewriteEvent.getSession(); |
167 | 0 | session.setFlowConstruct(rewriteEvent.getFlowConstruct()); |
168 | 0 | this.endpoint = rewriteEvent.getEndpoint(); |
169 | 0 | this.timeout = rewriteEvent.getTimeout(); |
170 | 0 | this.outputStream = (ResponseOutputStream) rewriteEvent.getOutputStream(); |
171 | 0 | if (rewriteEvent instanceof DefaultMuleEvent) |
172 | |
{ |
173 | 0 | this.transformedMessage = ((DefaultMuleEvent) rewriteEvent).getCachedMessage(); |
174 | |
} |
175 | 0 | fillProperties(rewriteEvent); |
176 | 0 | } |
177 | |
|
178 | |
protected void fillProperties(MuleEvent previousEvent) |
179 | |
{ |
180 | 0 | if (endpoint != null && endpoint.getProperties() != null) |
181 | |
{ |
182 | 0 | for (Iterator iterator = endpoint.getProperties().keySet().iterator(); iterator.hasNext();) |
183 | |
{ |
184 | 0 | String prop = (String) iterator.next(); |
185 | 0 | Object value = endpoint.getProperties().get(prop); |
186 | |
|
187 | 0 | if (!ignoreProperty(prop)) |
188 | |
{ |
189 | |
|
190 | 0 | message.setInvocationProperty(prop, value); |
191 | |
} |
192 | 0 | } |
193 | |
} |
194 | |
|
195 | 0 | setCredentials(); |
196 | 0 | } |
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
|
202 | |
|
203 | |
|
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
|
209 | |
|
210 | |
protected boolean ignoreProperty(String key) |
211 | |
{ |
212 | 0 | if (key == null) |
213 | |
{ |
214 | 0 | return true; |
215 | |
} |
216 | |
|
217 | 0 | for (int i = 0; i < ignoredPropertyOverrides.length; i++) |
218 | |
{ |
219 | 0 | if (key.equals(ignoredPropertyOverrides[i])) |
220 | |
{ |
221 | 0 | return false; |
222 | |
} |
223 | |
} |
224 | |
|
225 | 0 | return null != message.getOutboundProperty(key); |
226 | |
} |
227 | |
|
228 | |
protected void setCredentials() |
229 | |
{ |
230 | 0 | if (null != endpoint && null != endpoint.getEndpointURI() && null != endpoint.getEndpointURI().getUserInfo()) |
231 | |
{ |
232 | 0 | final String userName = endpoint.getEndpointURI().getUser(); |
233 | 0 | final String password = endpoint.getEndpointURI().getPassword(); |
234 | 0 | if (password != null && userName != null) |
235 | |
{ |
236 | 0 | credentials = new MuleCredentials(userName, password.toCharArray()); |
237 | |
} |
238 | |
} |
239 | 0 | } |
240 | |
|
241 | |
public Credentials getCredentials() |
242 | |
{ |
243 | 0 | MuleCredentials creds = message.getOutboundProperty(MuleProperties.MULE_CREDENTIALS_PROPERTY); |
244 | 0 | return (credentials != null ? credentials : creds); |
245 | |
} |
246 | |
|
247 | |
Object getCachedMessage() |
248 | |
{ |
249 | 0 | return transformedMessage; |
250 | |
} |
251 | |
|
252 | |
public MuleMessage getMessage() |
253 | |
{ |
254 | 0 | return message; |
255 | |
} |
256 | |
|
257 | |
public byte[] getMessageAsBytes() throws DefaultMuleException |
258 | |
{ |
259 | |
try |
260 | |
{ |
261 | 0 | return message.getPayloadAsBytes(); |
262 | |
} |
263 | 0 | catch (Exception e) |
264 | |
{ |
265 | 0 | throw new DefaultMuleException( |
266 | |
CoreMessages.cannotReadPayloadAsBytes(message.getPayload().getClass().getName()), e); |
267 | |
} |
268 | |
} |
269 | |
|
270 | |
@SuppressWarnings("unchecked") |
271 | |
public <T> T transformMessage(Class<T> outputType) throws TransformerException |
272 | |
{ |
273 | 0 | return (T) transformMessage(DataTypeFactory.create(outputType)); |
274 | |
} |
275 | |
|
276 | |
public <T> T transformMessage(DataType<T> outputType) throws TransformerException |
277 | |
{ |
278 | 0 | if (outputType == null) |
279 | |
{ |
280 | 0 | throw new TransformerException(CoreMessages.objectIsNull("outputType")); |
281 | |
} |
282 | 0 | return message.getPayload(outputType); |
283 | |
} |
284 | |
|
285 | |
|
286 | |
|
287 | |
|
288 | |
|
289 | |
|
290 | |
|
291 | |
|
292 | |
|
293 | |
|
294 | |
|
295 | |
|
296 | |
|
297 | |
@Deprecated |
298 | |
public byte[] transformMessageToBytes() throws TransformerException |
299 | |
{ |
300 | 0 | return transformMessage(DataType.BYTE_ARRAY_DATA_TYPE); |
301 | |
} |
302 | |
|
303 | |
|
304 | |
|
305 | |
|
306 | |
|
307 | |
|
308 | |
|
309 | |
|
310 | |
|
311 | |
|
312 | |
|
313 | |
|
314 | |
|
315 | |
public String transformMessageToString() throws TransformerException |
316 | |
{ |
317 | 0 | return transformMessage(DataTypeFactory.createWithEncoding(String.class, getEncoding())); |
318 | |
} |
319 | |
|
320 | |
public String getMessageAsString() throws MuleException |
321 | |
{ |
322 | 0 | return getMessageAsString(getEncoding()); |
323 | |
} |
324 | |
|
325 | |
|
326 | |
|
327 | |
|
328 | |
|
329 | |
|
330 | |
|
331 | |
|
332 | |
|
333 | |
public String getMessageAsString(String encoding) throws MuleException |
334 | |
{ |
335 | |
try |
336 | |
{ |
337 | 0 | return message.getPayloadForLogging(encoding); |
338 | |
} |
339 | 0 | catch (Exception e) |
340 | |
{ |
341 | 0 | throw new DefaultMuleException( |
342 | |
CoreMessages.cannotReadPayloadAsString(message.getClass().getName()), e); |
343 | |
} |
344 | |
} |
345 | |
|
346 | |
public String getId() |
347 | |
{ |
348 | 0 | return id; |
349 | |
} |
350 | |
|
351 | |
|
352 | |
|
353 | |
|
354 | |
|
355 | |
@Deprecated |
356 | |
public Object getProperty(String name) |
357 | |
{ |
358 | 0 | throw new UnsupportedOperationException("Method's behavior has changed in Mule 3, use " + |
359 | |
"event.getMessage() and suitable scope-aware property access " + |
360 | |
"methods on it"); |
361 | |
} |
362 | |
|
363 | |
|
364 | |
|
365 | |
|
366 | |
|
367 | |
@Deprecated |
368 | |
public Object getProperty(String name, Object defaultValue) |
369 | |
{ |
370 | 0 | throw new UnsupportedOperationException("Method's behavior has changed in Mule 3, use " + |
371 | |
"event.getMessage() and suitable scope-aware property access " + |
372 | |
"methods on it"); |
373 | |
} |
374 | |
|
375 | |
public ImmutableEndpoint getEndpoint() |
376 | |
{ |
377 | 0 | return endpoint; |
378 | |
} |
379 | |
|
380 | |
@Override |
381 | |
public String toString() |
382 | |
{ |
383 | 0 | StringBuffer buf = new StringBuffer(64); |
384 | 0 | buf.append("MuleEvent: ").append(getId()); |
385 | 0 | buf.append(", stop processing=").append(isStopFurtherProcessing()); |
386 | 0 | buf.append(", ").append(endpoint); |
387 | |
|
388 | 0 | return buf.toString(); |
389 | |
} |
390 | |
|
391 | |
protected String generateEventId() |
392 | |
{ |
393 | 0 | return UUID.getUUID(); |
394 | |
} |
395 | |
|
396 | |
public MuleSession getSession() |
397 | |
{ |
398 | 0 | return session; |
399 | |
} |
400 | |
|
401 | |
void setSession(MuleSession session) |
402 | |
{ |
403 | 0 | this.session = session; |
404 | 0 | } |
405 | |
|
406 | |
|
407 | |
|
408 | |
|
409 | |
public FlowConstruct getFlowConstruct() |
410 | |
{ |
411 | 0 | return session.getFlowConstruct(); |
412 | |
} |
413 | |
|
414 | |
|
415 | |
|
416 | |
|
417 | |
|
418 | |
|
419 | |
public boolean isStopFurtherProcessing() |
420 | |
{ |
421 | 0 | return stopFurtherProcessing; |
422 | |
} |
423 | |
|
424 | |
|
425 | |
|
426 | |
|
427 | |
|
428 | |
|
429 | |
|
430 | |
|
431 | |
|
432 | |
|
433 | |
|
434 | |
|
435 | |
public void setStopFurtherProcessing(boolean stopFurtherProcessing) |
436 | |
{ |
437 | 0 | this.stopFurtherProcessing = stopFurtherProcessing; |
438 | 0 | } |
439 | |
|
440 | |
@Override |
441 | |
public boolean equals(Object o) |
442 | |
{ |
443 | 0 | if (this == o) |
444 | |
{ |
445 | 0 | return true; |
446 | |
} |
447 | 0 | if (!(o instanceof DefaultMuleEvent)) |
448 | |
{ |
449 | 0 | return false; |
450 | |
} |
451 | |
|
452 | 0 | final DefaultMuleEvent event = (DefaultMuleEvent) o; |
453 | |
|
454 | 0 | if (message != null ? !message.equals(event.message) : event.message != null) |
455 | |
{ |
456 | 0 | return false; |
457 | |
} |
458 | 0 | return id.equals(event.id); |
459 | |
} |
460 | |
|
461 | |
@Override |
462 | |
public int hashCode() |
463 | |
{ |
464 | 0 | return 29 * id.hashCode() + (message != null ? message.hashCode() : 0); |
465 | |
} |
466 | |
|
467 | |
public int getTimeout() |
468 | |
{ |
469 | 0 | if (timeout == TIMEOUT_NOT_SET_VALUE) |
470 | |
{ |
471 | |
|
472 | 0 | timeout = endpoint.getResponseTimeout(); |
473 | |
} |
474 | 0 | return timeout; |
475 | |
} |
476 | |
|
477 | |
public void setTimeout(int timeout) |
478 | |
{ |
479 | 0 | this.timeout = timeout; |
480 | 0 | } |
481 | |
|
482 | |
|
483 | |
|
484 | |
|
485 | |
|
486 | |
|
487 | |
|
488 | |
|
489 | |
public OutputStream getOutputStream() |
490 | |
{ |
491 | 0 | return outputStream; |
492 | |
} |
493 | |
|
494 | |
private void writeObject(ObjectOutputStream out) throws IOException |
495 | |
{ |
496 | 0 | out.defaultWriteObject(); |
497 | 0 | out.writeInt(endpoint.hashCode()); |
498 | 0 | out.writeBoolean(endpoint instanceof InboundEndpoint); |
499 | 0 | out.writeObject(endpoint.getEndpointBuilderName()); |
500 | |
|
501 | |
|
502 | |
|
503 | |
|
504 | 0 | String uri = endpoint.getEndpointURI().getUri().toString(); |
505 | 0 | String connectorName = endpoint.getConnector().getName(); |
506 | 0 | out.writeObject(uri + "?connector=" + connectorName); |
507 | |
|
508 | |
|
509 | 0 | out.writeInt(endpoint.getTransformers().size()); |
510 | |
|
511 | |
|
512 | 0 | if (endpoint.getTransformers().size() > 0) |
513 | |
{ |
514 | 0 | for (Transformer transformer : endpoint.getTransformers()) |
515 | |
{ |
516 | 0 | out.writeObject(transformer.getName()); |
517 | |
} |
518 | |
} |
519 | 0 | } |
520 | |
|
521 | |
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException, MuleException |
522 | |
{ |
523 | 0 | logger = LogFactory.getLog(getClass()); |
524 | |
|
525 | 0 | in.defaultReadObject(); |
526 | 0 | serializedData = new HashMap<String, Object>(); |
527 | 0 | serializedData.put("endpointHashcode", in.readInt()); |
528 | 0 | serializedData.put("isInboundEndpoint", in.readBoolean()); |
529 | 0 | serializedData.put("endpointBuilderName", in.readObject()); |
530 | 0 | serializedData.put("endpointUri", in.readObject()); |
531 | 0 | int count = in.readInt(); |
532 | |
|
533 | 0 | List<String> transformerNames = new LinkedList<String>(); |
534 | 0 | if (count > 0) |
535 | |
{ |
536 | 0 | while (--count > 0) |
537 | |
{ |
538 | 0 | transformerNames.add((String) in.readObject()); |
539 | |
} |
540 | |
} |
541 | 0 | serializedData.put("transformers", transformerNames); |
542 | 0 | } |
543 | |
|
544 | |
|
545 | |
|
546 | |
|
547 | |
|
548 | |
|
549 | |
|
550 | |
|
551 | |
|
552 | |
|
553 | |
|
554 | |
|
555 | |
@SuppressWarnings({"unused", "unchecked"}) |
556 | |
private void initAfterDeserialisation(MuleContext muleContext) throws MuleException |
557 | |
{ |
558 | 0 | if (session instanceof DefaultMuleSession) |
559 | |
{ |
560 | 0 | ((DefaultMuleSession) session).initAfterDeserialisation(muleContext); |
561 | |
} |
562 | 0 | if (message instanceof DefaultMuleMessage) |
563 | |
{ |
564 | 0 | ((DefaultMuleMessage) message).initAfterDeserialisation(muleContext); |
565 | |
} |
566 | 0 | int endpointHashcode = (Integer) serializedData.get("endpointHashcode"); |
567 | 0 | boolean isInboundEndpoint = (Boolean) serializedData.get("isInboundEndpoint"); |
568 | 0 | String endpointBuilderName = (String) serializedData.get("endpointBuilderName"); |
569 | 0 | String endpointUri = (String) serializedData.get("endpointUri"); |
570 | 0 | List<String> transformerNames = (List<String>) serializedData.get("transformers"); |
571 | |
|
572 | |
|
573 | |
|
574 | 0 | endpoint = (ImmutableEndpoint) muleContext.getRegistry().lookupObject( |
575 | |
DefaultEndpointFactory.ENDPOINT_REGISTRY_PREFIX + endpointHashcode); |
576 | |
|
577 | |
|
578 | 0 | if (endpoint == null) |
579 | |
{ |
580 | |
|
581 | |
|
582 | 0 | if ((endpointBuilderName != null) |
583 | |
&& muleContext.getRegistry().lookupEndpointBuilder(endpointBuilderName) != null) |
584 | |
{ |
585 | 0 | if (isInboundEndpoint) |
586 | |
{ |
587 | 0 | endpoint = muleContext.getRegistry().lookupEndpointFactory().getInboundEndpoint( |
588 | |
endpointBuilderName); |
589 | |
} |
590 | |
else |
591 | |
{ |
592 | 0 | endpoint = muleContext.getRegistry().lookupEndpointFactory().getOutboundEndpoint( |
593 | |
endpointBuilderName); |
594 | |
} |
595 | |
} |
596 | |
|
597 | |
else |
598 | |
{ |
599 | 0 | List<Transformer> transformers = new LinkedList<Transformer>(); |
600 | 0 | for (String name : transformerNames) |
601 | |
{ |
602 | 0 | Transformer next = muleContext.getRegistry().lookupTransformer(name); |
603 | 0 | if (next == null) |
604 | |
{ |
605 | 0 | throw new IllegalStateException(CoreMessages.objectNotFound(name).toString()); |
606 | |
} |
607 | |
else |
608 | |
{ |
609 | 0 | transformers.add(next); |
610 | |
} |
611 | 0 | } |
612 | 0 | EndpointURI uri = new MuleEndpointURI(endpointUri, muleContext); |
613 | |
|
614 | 0 | TransportServiceDescriptor tsd = (TransportServiceDescriptor) muleContext.getRegistry().lookupServiceDescriptor(ServiceType.TRANSPORT, uri.getFullScheme(), null); |
615 | 0 | EndpointBuilder endpointBuilder = tsd.createEndpointBuilder(endpointUri); |
616 | 0 | endpointBuilder.setTransformers(transformers); |
617 | |
|
618 | 0 | if (isInboundEndpoint) |
619 | |
{ |
620 | 0 | endpoint = muleContext.getRegistry().lookupEndpointFactory().getInboundEndpoint( |
621 | |
endpointBuilder); |
622 | |
} |
623 | |
else |
624 | |
{ |
625 | 0 | endpoint = muleContext.getRegistry().lookupEndpointFactory().getOutboundEndpoint( |
626 | |
endpointBuilder); |
627 | |
} |
628 | |
} |
629 | |
} |
630 | |
|
631 | 0 | serializedData = null; |
632 | 0 | } |
633 | |
|
634 | |
|
635 | |
|
636 | |
|
637 | |
|
638 | |
|
639 | |
|
640 | |
|
641 | |
|
642 | |
public String getEncoding() |
643 | |
{ |
644 | 0 | String encoding = message.getEncoding(); |
645 | 0 | if (encoding == null) |
646 | |
{ |
647 | 0 | encoding = endpoint.getEncoding(); |
648 | |
} |
649 | |
|
650 | 0 | return encoding; |
651 | |
} |
652 | |
|
653 | |
public MuleContext getMuleContext() |
654 | |
{ |
655 | 0 | return message.getMuleContext(); |
656 | |
} |
657 | |
|
658 | |
public ThreadSafeAccess newThreadCopy() |
659 | |
{ |
660 | 0 | if (message instanceof ThreadSafeAccess) |
661 | |
{ |
662 | 0 | DefaultMuleEvent copy = new DefaultMuleEvent((MuleMessage) ((ThreadSafeAccess) message).newThreadCopy(), this); |
663 | 0 | copy.resetAccessControl(); |
664 | 0 | return copy; |
665 | |
} |
666 | |
else |
667 | |
{ |
668 | 0 | return this; |
669 | |
} |
670 | |
} |
671 | |
|
672 | |
public void resetAccessControl() |
673 | |
{ |
674 | 0 | if (message instanceof ThreadSafeAccess) |
675 | |
{ |
676 | 0 | ((ThreadSafeAccess) message).resetAccessControl(); |
677 | |
} |
678 | 0 | } |
679 | |
|
680 | |
public void assertAccess(boolean write) |
681 | |
{ |
682 | 0 | if (message instanceof ThreadSafeAccess) |
683 | |
{ |
684 | 0 | ((ThreadSafeAccess) message).assertAccess(write); |
685 | |
} |
686 | 0 | } |
687 | |
|
688 | |
@Deprecated |
689 | |
public Object transformMessage() throws TransformerException |
690 | |
{ |
691 | 0 | logger.warn("Deprecation warning: MUleEvent.transformMessage does nothing in Mule 3.0. The message is already transformed before the event reaches a component"); |
692 | 0 | return message.getPayload(); |
693 | |
} |
694 | |
} |