public class SocketInfo
extends java.lang.Object
SocketInfo stores information about one system socket: | Modifier and Type | Field and Description |
|---|---|
private java.lang.String |
applicationName
Application name associated with the socket.
|
private java.lang.String |
localIP
Local IP address of the flow.
|
private int |
localPort
Local transport layer port of the flow.
|
private static org.apache.log4j.Logger |
log
Used to log different events.
|
private java.lang.String |
protocolName
Transport layer protocol name of the flow.
|
private java.lang.String |
remoteIP
Remote IP address of the flow.
|
private int |
remotePort
Remote transport layer port of the flow.
|
private int |
socketID
Identifier of the socket.
|
private long |
timestamp
Timestamp showing when the socket was noticed.
|
| Constructor and Description |
|---|
SocketInfo(int socketId)
Constructs the object.
|
SocketInfo(java.lang.String protocolname,
java.lang.String localIP,
java.lang.String localPort,
java.lang.String remoteIP,
java.lang.String remotePort)
Constructs the object.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getApplicationName()
Gets application name associated with the socket.
|
java.lang.String |
getLocalIP()
Gets local IP address of the flow.
|
int |
getLocalPort()
Gets local transport layer port of the flow.
|
java.lang.String |
getProtocolName()
Gets transport layer protocol name.
|
java.lang.String |
getRemoteIP()
Gets remote IP address of the flow.
|
int |
getRemotePort()
Gets remote transport layer port of the flow.
|
int |
getSocketID()
Gets the identifier of the socket.
|
long |
getTimestamp()
Gets timestamp when the socket was noticed.
|
int |
hashCode()
Gets hashcode of the socket.
|
void |
setApplicationName(java.lang.String applicationName)
Sets application name associated with the socket.
|
private void |
setLocalIP(java.lang.String localIP)
Sets local IP address of the flow.
|
private void |
setLocalPort(int localPort)
Sets local transport layer port of the flow.
|
private void |
setProtocolName(java.lang.String protocolName)
Set transport layer protocol name.
|
private void |
setRemoteIP(java.lang.String remoteIP)
Sets remote IP address of the flow.
|
private void |
setRemotePort(int remotePort)
Sets remote transport layer port of the flow.
|
private void |
setSocketID(int socketID)
Sets the identifier of the socket.
|
void |
setTimestamp(long timestamp)
Sets timestamp when the socket was noticed.
|
private static org.apache.log4j.Logger log
private java.lang.String localIP
private java.lang.String remoteIP
private int localPort
private int remotePort
private java.lang.String protocolName
private int socketID
private long timestamp
private java.lang.String applicationName
public SocketInfo(int socketId)
socketId - identifier of the socketpublic SocketInfo(java.lang.String protocolname,
java.lang.String localIP,
java.lang.String localPort,
java.lang.String remoteIP,
java.lang.String remotePort)
protocolname - transport layer protocol namelocalIP - local IP addresslocalPort - local transport layer flowremoteIP - remote IP addressremotePort - remote transport layer portprivate void setLocalIP(java.lang.String localIP)
localIP - local IP addressprivate void setRemoteIP(java.lang.String remoteIP)
remoteIP - remote IP addressprivate void setLocalPort(int localPort)
localPort - local tranport layer portprivate void setRemotePort(int remotePort)
remotePort - remote transport layer portprivate void setProtocolName(java.lang.String protocolName)
protocolName - transport layer protocol namepublic java.lang.String getLocalIP()
public java.lang.String getRemoteIP()
public int getLocalPort()
public int getRemotePort()
public java.lang.String getProtocolName()
public java.lang.String getApplicationName()
public void setApplicationName(java.lang.String applicationName)
applicationName - application name associated with the socketpublic int getSocketID()
private void setSocketID(int socketID)
socketID - identifier of the socketpublic long getTimestamp()
public void setTimestamp(long timestamp)
timestamp - timestamp measured in milisecondspublic int hashCode()
hashCode in class java.lang.Object