1 /* 2 Copyright 2007 Ramon Servadei 3 4 Licensed under the Apache License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 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 package fulmine.model.container.events; 17 18 import fulmine.Addressable; 19 import fulmine.IAddressable; 20 import fulmine.IDomain; 21 import fulmine.IType; 22 import fulmine.event.IEventManager; 23 import fulmine.event.IEventSource; 24 import fulmine.event.system.AbstractSystemEvent; 25 import fulmine.event.system.ISystemEvent; 26 import fulmine.event.system.ISystemEventListener; 27 import fulmine.model.container.IContainer; 28 29 /** 30 * Raised when a local {@link IContainer} has been destroyed. 31 * <p> 32 * This is an {@link ISystemEvent} and listeners for these events need to be 33 * instances of {@link ISystemEventListener}. The listener should be registered 34 * against the {@link IEventSource} returned from 35 * {@link IEventManager#getSystemEventSource(Class)}. 36 * 37 * @author Ramon Servadei 38 */ 39 public final class ContainerDestroyedEvent extends AbstractSystemEvent 40 { 41 /** 42 * Unit test constructor 43 * 44 * @param context 45 * the context for event operations 46 * @param identity 47 * the identity of the container that has been destroyed 48 * @param type 49 * the container type that has been destroyed 50 * @param domain 51 * the domain of the container that has been destroyed 52 */ 53 public ContainerDestroyedEvent(IEventManager context, String identity, 54 IType type, IDomain domain) 55 { 56 super(context, new Addressable(identity, type, domain)); 57 } 58 59 /** 60 * Constructor using a template addressable 61 * 62 * @param context 63 * the context for event operations 64 * @param id 65 * the addressable for this 66 */ 67 public ContainerDestroyedEvent(IEventManager context, IAddressable id) 68 { 69 super(context, id); 70 } 71 }