1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.endpoint.outbound; |
8 | |
|
9 | |
import org.mule.api.MuleEvent; |
10 | |
import org.mule.api.MuleException; |
11 | |
import org.mule.api.processor.MessageProcessor; |
12 | |
import org.mule.api.transport.SessionHandler; |
13 | |
import org.mule.util.ObjectUtils; |
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
public class OutboundSessionHandlerMessageProcessor implements MessageProcessor |
21 | |
{ |
22 | |
private SessionHandler sessionHandler; |
23 | |
|
24 | |
public OutboundSessionHandlerMessageProcessor(SessionHandler sessionHandler) |
25 | 0 | { |
26 | 0 | this.sessionHandler = sessionHandler; |
27 | 0 | } |
28 | |
|
29 | |
public MuleEvent process(MuleEvent event) throws MuleException |
30 | |
{ |
31 | 0 | sessionHandler.storeSessionInfoToMessage(event.getSession(), event.getMessage()); |
32 | 0 | return event; |
33 | |
} |
34 | |
|
35 | |
@Override |
36 | |
public String toString() |
37 | |
{ |
38 | 0 | return ObjectUtils.toString(this); |
39 | |
} |
40 | |
} |