1  /*
     2   * Copyright the original author or authors.
     3   * 
     4   * Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License");
     5   * you may not use this file except in compliance with the License.
     6   * You may obtain a copy of the License at
     7   * 
     8   *      http://www.mozilla.org/MPL/MPL-1.1.html
     9   * 
    10   * Unless required by applicable law or agreed to in writing, software
    11   * distributed under the License is distributed on an "AS IS" BASIS,
    12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13   * See the License for the specific language governing permissions and
    14   * limitations under the License.
    15   */
    16  
    17  import org.as2lib.core.BasicClass;
    18  import org.as2lib.env.event.distributor.EventDistributorControlFactory;
    19  import org.as2lib.env.event.distributor.EventDistributorControl;
    20  import org.as2lib.env.event.distributor.SimpleConsumableEventDistributorControl;
    21  
    22  /**
    23   * {@code SimpleConsumableEventDistributorControlFactory} creates instances of class
    24   * {@link SimpleConsumableEventDistributorControl}.
    25   * 
    26   * @author Martin Heidegger
    27   */
    28  class org.as2lib.env.event.distributor.SimpleConsumableEventDistributorControlFactory extends BasicClass implements EventDistributorControlFactory {
    29  	
    30  	/**
    31  	 * Creates a new instance of class {@link SimpleConsumableEventDistributorControl}.
    32  	 * 
    33  	 * @param type the distributor and listener type for the new event distributor
    34  	 * control
    35  	 * @return an instance of class {@code SimpleConsumableEventDistributorControl} that
    36  	 * is configured with the given {@code type}
    37  	 */
    38  	public function createEventDistributorControl(type:Function):EventDistributorControl {
    39  		return new SimpleConsumableEventDistributorControl(type);
    40  	}
    41  	
    42  }