Package org.netxms.client
Class PortStopEntry
java.lang.Object
org.netxms.client.PortStopEntry
Entry in port stop list. Defines a port that should be blocked from access.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final charstatic final charstatic final char -
Constructor Summary
ConstructorsConstructorDescriptionPortStopEntry(int port, char protocol) Create new port stop entry.PortStopEntry(NXCPMessage msg, long baseId) Create entry from NXCP message. -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidfillMessage(NXCPMessage msg, long baseId) Fill NXCP message with entry data.intgetPort()Get port number.charGet protocol.Get protocol as human-readable string.inthashCode()booleanCheck if TCP is blocked.booleanCheck if UDP is blocked.voidsetPort(int port) Set port number.voidsetProtocol(char protocol) Set protocol.toString()
-
Field Details
-
PROTOCOL_TCP
public static final char PROTOCOL_TCP- See Also:
-
PROTOCOL_UDP
public static final char PROTOCOL_UDP- See Also:
-
PROTOCOL_BOTH
public static final char PROTOCOL_BOTH- See Also:
-
-
Constructor Details
-
PortStopEntry
public PortStopEntry(int port, char protocol) Create new port stop entry.- Parameters:
port- port number (1-65535)protocol- protocol ('T' = TCP, 'U' = UDP, 'B' = Both)
-
PortStopEntry
Create entry from NXCP message.- Parameters:
msg- NXCP messagebaseId- base variable ID
-
-
Method Details
-
fillMessage
Fill NXCP message with entry data.- Parameters:
msg- NXCP messagebaseId- base variable ID
-
getPort
public int getPort()Get port number.- Returns:
- port number
-
setPort
public void setPort(int port) Set port number.- Parameters:
port- port number (1-65535)
-
getProtocol
public char getProtocol()Get protocol.- Returns:
- protocol character ('T', 'U', or 'B')
-
setProtocol
public void setProtocol(char protocol) Set protocol.- Parameters:
protocol- protocol character ('T' = TCP, 'U' = UDP, 'B' = Both)
-
isTcpBlocked
public boolean isTcpBlocked()Check if TCP is blocked.- Returns:
- true if TCP is blocked
-
isUdpBlocked
public boolean isUdpBlocked()Check if UDP is blocked.- Returns:
- true if UDP is blocked
-
getProtocolString
Get protocol as human-readable string.- Returns:
- protocol string ("TCP", "UDP", or "TCP/UDP")
-
toString
-
hashCode
public int hashCode() -
equals
-