1
2
3
4
5
6
7 package org.mule.module.jca;
8
9 import org.mule.api.MuleContext;
10 import org.mule.api.MuleEvent;
11 import org.mule.api.MuleException;
12 import org.mule.api.processor.MessageProcessor;
13 import org.mule.api.processor.MessageProcessorChainBuilder;
14 import org.mule.module.jca.i18n.JcaMessages;
15 import org.mule.service.AbstractService;
16
17
18
19
20
21
22 public class JcaService extends AbstractService
23 {
24
25
26
27
28 private static final long serialVersionUID = -1510441245219710451L;
29
30
31 public JcaService(MuleContext muleContext)
32 {
33 super(muleContext);
34 }
35
36
37
38
39
40
41
42
43 public MuleEvent sendEvent(MuleEvent event) throws MuleException
44 {
45 throw new UnsupportedOperationException("sendEvent()");
46 }
47
48 public boolean isPaused()
49 {
50
51
52 return false;
53 }
54
55 protected void waitIfPaused(MuleEvent event) throws InterruptedException
56 {
57
58
59 }
60
61 protected void doPause()
62 {
63 throw new UnsupportedOperationException(JcaMessages.cannotPauseResumeJcaComponent().getMessage());
64 }
65
66 protected void doResume()
67 {
68 throw new UnsupportedOperationException(JcaMessages.cannotPauseResumeJcaComponent().getMessage());
69 }
70
71 @Override
72 protected void addMessageProcessors(MessageProcessorChainBuilder builder)
73 {
74 builder.chain(new MessageProcessor()
75 {
76
77
78 public MuleEvent process(MuleEvent event) throws MuleException
79 {
80 return component.process(event);
81 }
82 });
83 }
84 }