01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
16: */
17: package org.bpmscript.jbi.component;
18:
19: import java.util.concurrent.Callable;
20:
21: import org.apache.servicemix.common.Endpoint;
22: import org.bpmscript.IProcessExecutor;
23: import org.bpmscript.IProcessInstanceManager;
24: import org.bpmscript.IProcessManager;
25:
26: public class BpmScriptServices implements IBpmScriptServices {
27:
28: private IProcessManager processManager = null;
29: private IProcessExecutor processExecutor;
30: private Endpoint alarmEndpoint = null;
31: private Endpoint corellationEndpoint = null;
32: private Endpoint remoteProcessManagerEndpoint = null;
33: private String defaultNamespace;
34: private Callable<Void> closeCallback;
35: private IProcessInstanceManager processInstanceManager;
36:
37: public BpmScriptServices(IProcessManager processManager,
38: IProcessInstanceManager processInstanceManager,
39: IProcessExecutor processExecutor, Endpoint alarmEndpoint,
40: Endpoint corellationEndpoint,
41: Endpoint remoteProcessManagerEndpoint,
42: String defaultNamespace, Callable<Void> closeCallback) {
43: super ();
44: this .processManager = processManager;
45: this .processInstanceManager = processInstanceManager;
46: this .processExecutor = processExecutor;
47: this .alarmEndpoint = alarmEndpoint;
48: this .corellationEndpoint = corellationEndpoint;
49: this .remoteProcessManagerEndpoint = remoteProcessManagerEndpoint;
50: this .defaultNamespace = defaultNamespace;
51: this .closeCallback = closeCallback;
52: }
53:
54: public IProcessManager getProcessManager() {
55: return processManager;
56: }
57:
58: public Endpoint getAlarmEndpoint() {
59: return alarmEndpoint;
60: }
61:
62: public Endpoint getCorellationEndpoint() {
63: return corellationEndpoint;
64: }
65:
66: public String getDefaultNamespace() {
67: return defaultNamespace;
68: }
69:
70: public IProcessExecutor getProcessExecutor() {
71: return processExecutor;
72: }
73:
74: public Endpoint getRemoteProcessManagerEndpoint() {
75: return remoteProcessManagerEndpoint;
76: }
77:
78: public void close() throws Exception {
79: closeCallback.call();
80: }
81:
82: public IProcessInstanceManager getProcessInstanceManager() {
83: return processInstanceManager;
84: }
85:
86: }
|