Class Application
- java.lang.Object
-
- io.patriot_framework.network.simulator.api.model.devices.application.Application
-
- All Implemented Interfaces:
Device
,EnvironmentPart
public class Application extends Object implements Device
Application can represent data generator or every container connected to topology.
-
-
Field Summary
Fields Modifier and Type Field Description static int
DEFAULT_PORT
-
Constructor Summary
Constructors Constructor Description Application(String name)
Instantiates a new Application.Application(String name, String creator)
Instantiates a new Application.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAddressForNetwork(String address, String networkName)
boolean
equals(Object o)
String
executeCommand(String[] commandWithArgs)
Execute command string.String
getAddressForNetwork(String networkName)
List<Network>
getConnectedNetworks()
Gets connected networks.String
getCreator()
Returns creator identifier of env part.String
getIPAddress()
Gets ip address.Integer
getManagementPort()
Gets management port.String
getName()
Gets name.int
hashCode()
void
setIPAddress(String ipAddress)
Sets ip address.void
setManagementPort(Integer managementPort)
Sets management port.
-
-
-
Field Detail
-
DEFAULT_PORT
public static final int DEFAULT_PORT
- See Also:
- Constant Field Values
-
-
Method Detail
-
executeCommand
public String executeCommand(String[] commandWithArgs)
Execute command string.- Parameters:
commandWithArgs
- the command with args- Returns:
- the string
-
getIPAddress
public String getIPAddress()
Description copied from interface:Device
Gets ip address.- Specified by:
getIPAddress
in interfaceDevice
- Returns:
- the ip address
-
setIPAddress
public void setIPAddress(String ipAddress)
Description copied from interface:Device
Sets ip address.- Specified by:
setIPAddress
in interfaceDevice
- Parameters:
ipAddress
- the ip address
-
getConnectedNetworks
public List<Network> getConnectedNetworks()
Description copied from interface:Device
Gets connected networks.- Specified by:
getConnectedNetworks
in interfaceDevice
- Returns:
- the connected networks
-
getManagementPort
public Integer getManagementPort()
Description copied from interface:Device
Gets management port.- Specified by:
getManagementPort
in interfaceDevice
- Returns:
- the management port
-
setManagementPort
public void setManagementPort(Integer managementPort)
Description copied from interface:Device
Sets management port.- Specified by:
setManagementPort
in interfaceDevice
- Parameters:
managementPort
- the management port
-
getCreator
public String getCreator()
Description copied from interface:EnvironmentPart
Returns creator identifier of env part.- Specified by:
getCreator
in interfaceEnvironmentPart
- Returns:
- creator of this object
-
getAddressForNetwork
public String getAddressForNetwork(String networkName)
- Specified by:
getAddressForNetwork
in interfaceDevice
-
addAddressForNetwork
public boolean addAddressForNetwork(String address, String networkName)
- Specified by:
addAddressForNetwork
in interfaceDevice
-
-