001/*
002 * Copyright (C) 2009 Swedish Institute of Computer Science (SICS) Copyright (C)
003 * 2009 Royal Institute of Technology (KTH)
004 *
005 * GVoD is free software; you can redistribute it and/or
006 * modify it under the terms of the GNU General Public License
007 * as published by the Free Software Foundation; either version 2
008 * of the License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
013 * GNU General Public License for more details.
014 *
015 * You should have received a copy of the GNU General Public License
016 * along with this program; if not, write to the Free Software
017 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
018 */
019package se.sics.kompics.simulator.events.system;
020
021import java.util.HashMap;
022import java.util.Map;
023import se.sics.kompics.ComponentDefinition;
024import se.sics.kompics.Init;
025import se.sics.kompics.network.Address;
026import se.sics.kompics.simulator.events.SystemEvent;
027
028/**
029 * @author Alex Ormenisan {@literal {@literal <[email protected]>}}
030 */
031public abstract class StartNodeEvent extends SystemEvent {
032
033    public StartNodeEvent() {
034        super();
035    }
036
037    /**
038     * Override to provide custom implementation. Default implementation provides no per node config
039     *
040     * @return per node configuration difference &lt;optionName,optionValue&gt;
041     */
042    public Map<String, Object> initConfigUpdate() {
043        HashMap<String, Object> empty = new HashMap<>();
044        return empty;
045    }
046
047    public abstract Address getNodeAddress();
048
049    public abstract Class<? extends ComponentDefinition> getComponentDefinition();
050
051    // TODO maybe make this properly conform to a single component type?
052    public abstract Init getComponentInit();
053}