simnet
Class DropPolicyPluginType

java.lang.Object
  extended bysimnet.PluginType
      extended bysimnet.DropPolicyPluginType

public class DropPolicyPluginType
extends PluginType


Constructor Summary
DropPolicyPluginType()
           
 
Method Summary
 java.lang.Object findInstance(Node node, java.lang.Class the_class, java.lang.String[] args)
          Find and return the instance of the specified class on the specified node that matches the given arguments.
protected  Link getLink(Node node, java.lang.String[] args)
          Returns the link from the specified node to the first argument of args.
 java.lang.String getType()
          Returns the name of the class that this plugin type is for.
 java.lang.String getUsage()
          Returns a string describing how to use this type of plugin, suitable for being displayed by help.
 boolean initInstance(Node node, java.lang.Object instance, java.lang.String[] args)
          Initialize the instance of an object that is passed to it, and "running" on the specified node.
 boolean isBatch(boolean in, Node node, java.lang.Class the_class, java.lang.String[] args)
          Drop policies can be batch plugged in or out for all links.
 boolean removeInstance(Node node, java.lang.Class the_class, java.lang.String[] args)
          Remove the object specified (in the same way as findInstance) from its "primary location", as defined by this type of plugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DropPolicyPluginType

public DropPolicyPluginType()
Method Detail

getType

public java.lang.String getType()
Returns the name of the class that this plugin type is for.

Specified by:
getType in class PluginType

getUsage

public java.lang.String getUsage()
Returns a string describing how to use this type of plugin, suitable for being displayed by help. Should not include the common part, i.e.: "plug (in|out) [all|@]"

Specified by:
getUsage in class PluginType

isBatch

public boolean isBatch(boolean in,
                       Node node,
                       java.lang.Class the_class,
                       java.lang.String[] args)
Drop policies can be batch plugged in or out for all links.

Specified by:
isBatch in class PluginType

getLink

protected Link getLink(Node node,
                       java.lang.String[] args)
Returns the link from the specified node to the first argument of args. Null is returned if no such link can be found.


findInstance

public java.lang.Object findInstance(Node node,
                                     java.lang.Class the_class,
                                     java.lang.String[] args)
Find and return the instance of the specified class on the specified node that matches the given arguments. Return null if no such object exists.

Specified by:
findInstance in class PluginType

removeInstance

public boolean removeInstance(Node node,
                              java.lang.Class the_class,
                              java.lang.String[] args)
Remove the object specified (in the same way as findInstance) from its "primary location", as defined by this type of plugin. Returns if the operation was sucessful.

Specified by:
removeInstance in class PluginType

initInstance

public boolean initInstance(Node node,
                            java.lang.Object instance,
                            java.lang.String[] args)
Initialize the instance of an object that is passed to it, and "running" on the specified node. Then add the instance to its "primary location". Returns if the operation was sucessful.

Specified by:
initInstance in class PluginType