View Javadoc

1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     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.apache.commons.scxml;
18  
19  import java.util.List;
20  import java.util.Map;
21  
22  /***
23   * The event controller interface used to send messages containing
24   * events or other information directly to another SCXML Interpreter,
25   * other external systems using an Event I/O Processor or to raise
26   * events in the current SCXML session.
27   *
28   */
29  public interface EventDispatcher {
30  
31      /***
32       * Cancel the specified send message.
33       *
34       * @param sendId The ID of the send message to cancel
35       */
36      void cancel(String sendId);
37  
38      /***
39       * Send this message to the target.
40       *
41       * @param sendId The ID of the send message
42       * @param target An expression returning the target location of the event
43       * @param targetType The type of the Event I/O Processor that the event
44       *  should be dispatched to
45       * @param event The type of event being generated.
46       * @param params A list of zero or more whitespace separated variable
47       *  names to be included with the event.
48       * @param hints The data containing information which may be
49       *  used by the implementing platform to configure the event processor
50       * @param delay The event is dispatched after the delay interval elapses
51       * @param externalNodes The list of external nodes associated with
52       *  the <send> element.
53       */
54      void send(String sendId, String target, String targetType,
55              String event, Map params, Object hints, long delay,
56              List externalNodes);
57  
58  }
59