001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.commons.scxml2; 018 019/** 020 * The SCXML I/O Processor provides the interface for either an internal process or an external system or invoked child 021 * SCXML process ({@link org.apache.commons.scxml2.invoke.Invoker}) to send events into the SCXML processor queue. 022 */ 023public interface SCXMLIOProcessor { 024 025 /** 026 * The name of the default SCXML I/O Event Processor 027 */ 028 String DEFAULT_EVENT_PROCESSOR = "http://www.w3.org/TR/scxml/#SCXMLEventProcessor"; 029 030 /** 031 * Prefix for SCXML I/O Event Processor aliases 032 */ 033 String EVENT_PROCESSOR_ALIAS_PREFIX = "#_"; 034 035 /** 036 * Default SCXML I/O Event Processor alias 037 */ 038 String SCXML_EVENT_PROCESSOR = "scxml"; 039 040 /** 041 * Prefix for SCXML I/O (own) Session external Event processor 042 */ 043 String SCXML_SESSION_EVENT_PROCESSOR_PREFIX = EVENT_PROCESSOR_ALIAS_PREFIX + "scxml_"; 044 045 /** 046 * The name of the internal Event Processor 047 */ 048 String INTERNAL_EVENT_PROCESSOR = EVENT_PROCESSOR_ALIAS_PREFIX + "internal"; 049 050 /** 051 * The name of the parent Event Processor 052 */ 053 String PARENT_EVENT_PROCESSOR = EVENT_PROCESSOR_ALIAS_PREFIX + "parent"; 054 055 /** 056 * Send an event into the SCXML processor queue 057 * <p> 058 * @param event the event to send 059 */ 060 void addEvent(TriggerEvent event); 061}