|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectuk.org.arlott.simon.hw.f24.lbsta.ScriptComponent
uk.org.arlott.simon.hw.f24.lbsta.ScriptAction
public class ScriptAction
Represents an action to perform in a script.
| Field Summary | |
|---|---|
int |
bridgeID
Bridge ID. |
int |
bridgePort
Bridge Port. |
int |
dstHostAddress
Destination host address. |
boolean |
enable
Enable/disable value. |
static int |
ENABLE_OR_DISABLE_PORT
Enable or disable port action. |
static int |
HOST_ENABLE_OR_DISABLE_RANDOM_PACKETS
Enable or disable random packet sending on a host action. |
static int |
HOST_SEND_PACKET
Send packet from a host action. |
int |
hostAddress
Host address. |
static int |
RESET_BRIDGES
Reset bridges action. |
int |
srcHostAddress
Source host address. |
int |
type
Type of this action. |
| Constructor Summary | |
|---|---|
private |
ScriptAction(int type)
Creates a new ScriptAction of the specified type. |
| Method Summary | |
|---|---|
static ScriptAction |
createEnableOrDisablePort(int bridgeID,
int bridgePort,
boolean enable)
Creates a new Bridge Port Enable/Disable action. |
static ScriptAction |
createHostEnableOrDisableRandomPackets(int hostAddress,
boolean enable)
Creates a new Host Random Packets Enable/Disable action. |
static ScriptAction |
createHostSendPacket(int srcHostAddress,
int dstHostAddress)
Creates a new Send Host Packet action. |
static ScriptAction |
createResetBridges()
Creates a new Reset Bridges action. |
void |
doAction(Network network)
Peforms this action on the network. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int RESET_BRIDGES
public static final int ENABLE_OR_DISABLE_PORT
public static final int HOST_SEND_PACKET
public static final int HOST_ENABLE_OR_DISABLE_RANDOM_PACKETS
public int type
public int bridgeID
public int bridgePort
public boolean enable
public int hostAddress
public int srcHostAddress
public int dstHostAddress
| Constructor Detail |
|---|
private ScriptAction(int type)
ScriptAction of the specified type.
type - The type of action to create.| Method Detail |
|---|
public static ScriptAction createResetBridges()
ScriptAction.
public static ScriptAction createEnableOrDisablePort(int bridgeID,
int bridgePort,
boolean enable)
bridgeID - The Bridge ID.bridgePort - The Bridge Port ID.enable - The new status of the bridge port.
ScriptAction.
public static ScriptAction createHostSendPacket(int srcHostAddress,
int dstHostAddress)
srcHostAddress - The address of the source host.dstHostAddress - The address of the destination host.
ScriptAction.
public static ScriptAction createHostEnableOrDisableRandomPackets(int hostAddress,
boolean enable)
hostAddress - The host address.enable - The new status of the random packets setting.
ScriptAction.public void doAction(Network network)
network - The Network to perform the action on.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||