01: package com.bostech.corporation.component.echo;
02:
03: import javax.jbi.messaging.MessageExchange;
04:
05: import com.bostech.corporation.component.echo.processors.EchoProviderProcessor;
06: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.IComponentProcessor;
07: import com.bostechcorp.cbesb.runtime.ccsl.jbi.messaging.LifeCycleEndpoint;
08:
09: public class EchoEndpoint extends LifeCycleEndpoint {
10:
11: protected String Output_to_Log = null;
12: protected String Output_Style = null;
13:
14: /* Setter for the Output_to_Log */
15: public void setOutput_to_Log(String value) {
16: this .Output_to_Log = value;
17: }
18:
19: /* Getter for the Output_to_Log*/
20: public String getOutput_to_Log() {
21: return this .Output_to_Log;
22: }
23:
24: /* Setter for the Output_Style */
25: public void setOutput_Style(String value) {
26: this .Output_Style = value;
27: }
28:
29: /* Getter for the Output_Style*/
30: public String getOutput_Style() {
31: return this .Output_Style;
32: }
33:
34: protected IComponentProcessor createProviderProcessor() {
35: return new EchoProviderProcessor(this );
36: }
37:
38: protected IComponentProcessor createConsumerProcessor() {
39: return null;
40: }
41:
42: public void processAsConsumer(MessageExchange exchange)
43: throws Exception {
44: Exception e = new Exception(
45: "Echo component doesn't support Consumer role ");
46: exchange.setError(e);
47: channel.send(exchange);
48: throw e;
49: }
50: }
|