package lava.net.mmp; import java.util.Enumeration; import lava.net.common.UNA; import lava.net.common.Value; /** * **/ public abstract class MMPCenter { /** * Returns a Value containing a list of Protocols used by this MMPCenter. **/ abstract public Value usingProtocols() ; /** * Returns an Array of Locations this MMPCenter is listen on. **/ abstract public UNA[] getListenLocations() ; /** * Set the MMPPacketManager for the actual local root MMP instance, * which is called by this MMPCenter if it delivers some MMP event. **/ abstract public void setManager(MMPPacketManager manager) ; /** * Returns an Array of Names of all MMP variables set by the specified * remote MMP instance for the actual local root MMP instance.
* Returns null, if the remote instance isnīt known. **/ abstract public String[] getVars(UNA remote) ; /** * Returns an Array of Names of all MMP variables set by the specified * remote MMP instance for the specified local MMP instance.
* Returns null, if the remote instance isnīt known. **/ abstract protected String[] getVars(UNA remote, UNA local) ; /** * Returns the Value of the specified variable set by the specified * remote MMP instance for the actual local root MMP instance.
* Returns null, if the remote instance isnīt known or the variable * does not exist. **/ abstract public Value getValue(UNA remote, String name) ; /** * Returns the Value of the specified variable set by the specified * remote MMP instance for the specified local MMP instance.
* Returns null, if the remote instance isnīt known or the variable * does not exist. **/ abstract protected Value getValue(UNA remote, UNA local, String name) ; /** * Removes the specified variable set by the specified * remote MMP instance for the actual local root MMP instance.
* Returns null, if the remote instance isnīt known or the variable * does not exist.
* Returns the removed Value of the variable else. **/ abstract public Value removeValue(UNA remote, String name) ; /** * Removes the specified variable set by the specified * remote MMP instance for the specified local MMP instance.
* Returns null, if the remote instance isnīt known or the variable * does not exist.
* Returns the removed Value of the variable else. **/ abstract protected Value removeValue(UNA remote, UNA local, String name) ; /** * Closes this Message Center including all its connections. **/ abstract public void close() ; /** * Closes every connection associated with the specified remote MMP instance * and possible sub-instances. **/ abstract public void close(UNA remote) ; /** * Closes every connection associated with the specified remote MMP instance * and possible sub-instances and the specified local MMP instance * and possible sub-instances. **/ abstract protected void close(UNA remote, UNA local) ; /** * Returns the local Address associated with the specified remote * MMP instance. **/ abstract public UNA getLocal(UNA remote) ; /** * Assigns a MMP variable to the given Value for the specified * remote MMP instance for the actual local root MMP instance. **/ abstract public void assignVariable(UNA remote, String name, Value value) ; /** * Assigns a MMP variable to the given Value for the specified * remote MMP instance for the specfied local MMP instance. **/ abstract protected void assignVariable(UNA remote, UNA local, // String name, Value value) ; /** * Augments a MMP variable with the given Value for the specified * remote MMP instance for the actual local root MMP instance. **/ abstract public void augmentVariable(UNA remote, String name, Value value) ; /** * Augments a MMP variable with the given Value for the specified * remote MMP instance for the specfied local MMP instance. **/ abstract protected void augmentVariable(UNA remote, UNA local, // String name, Value value) ; /** * Diminishes a MMP variable with the given Value for the specified * remote MMP instance for the actual local root MMP instance. **/ abstract public void diminishVariable(UNA remote, String name, Value value) ; /** * Diminishes a MMP variable with the given Value for the specified * remote MMP instance for the specfied local MMP instance. **/ abstract protected void diminishVariable(UNA remote, UNA local, // String name, Value value) ; /** * Sends a MMP packet to the given remote MMP instance * for the actual local root MMP instance. **/ abstract public void send(UNA remote, MMPPacket packet) ; /** * Sends a MMP packet to the given remote MMP instance * for the specfied local MMP instance. **/ abstract protected void send(UNA remote, UNA local, MMPPacket packet) ; /** * Returns a Enumeration with all remote MMP instances known * by this MMP center. **/ abstract public Enumeration getAllRemotes() ; /** * Returns a Enumeration with all remote MMP instances known * by this MMP center which are connected to the specified * local MMP instance. **/ abstract protected Enumeration getAllRemotes(UNA local) ; /** * Sends a MMP packet to all remote MMP instances known * by this MMP center. **/ abstract public void broadcast(MMPPacket packet) ; /** * Sends a MMP packet to all remote MMP instances which are * connected to the given local MMP instance. **/ abstract protected void broadcast(UNA local, MMPPacket packet) ; }