Class NetStat.BusyPort.Builder
java.lang.Object
org.terracotta.utilities.test.net.NetStat.BusyPort.Builder
- Enclosing class:
- NetStat.BusyPort
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate InetSocketAddressprivate longprivate InetSocketAddressprivate Stringprivate NetStat.BusyPort.TcpState -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) NetStat.BusyPortbuild()Constructs aNetStat.BusyPortinstance from the content of thisBuilder.(package private) NetStat.BusyPort.BuildercommandLine(String commandLine) Sets the full/long command string for the connection.(package private) NetStat.BusyPort.BuilderlocalEndpoint(InetSocketAddress endpoint) Sets the local endpoint for the connection.(package private) NetStat.BusyPort.BuilderlocalEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port) Sets the local endpoint for the connection.private InetSocketAddressprocessEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port) (package private) NetStat.BusyPort.BuilderSets the process id for the connection.(package private) NetStat.BusyPort.BuilderremoteEndpoint(InetSocketAddress endpoint) Sets the remote endpoint for the connection.(package private) NetStat.BusyPort.BuilderremoteEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port) Sets the remote endpoint for the connection.(package private) NetStat.BusyPort.BuilderresetTcp()Resets the TCP information in thisBuilder.(package private) NetStat.BusyPort.BuildershortCommand(String shortCommand) Sets the short command string for the connection.(package private) NetStat.BusyPort.Builderstate(NetStat.BusyPort.TcpState state) Sets theNetStat.BusyPort.TcpStatefor the connection.
-
Field Details
-
processId
private long processId -
localEndpoint
-
remoteEndpoint
-
state
-
shortCommand
-
commandLine
-
-
Constructor Details
-
Builder
Builder() -
Builder
Builder(NetStat.BusyPort busyPort)
-
-
Method Details
-
build
NetStat.BusyPort build()Constructs aNetStat.BusyPortinstance from the content of thisBuilder. This method does not reset the content of theBuilder.- Returns:
- a new
BusyPortinstance
-
resetTcp
NetStat.BusyPort.Builder resetTcp()Resets the TCP information in thisBuilder. The process-related information is retained.- Returns:
thisBuilder
-
processId
Sets the process id for the connection.- Parameters:
processId- the process id extracted from command output- Returns:
thisBuilder
-
shortCommand
Sets the short command string for the connection.- Parameters:
shortCommand- the short command string extracted from command output- Returns:
thisBuilder
-
commandLine
Sets the full/long command string for the connection.- Parameters:
commandLine- the full command string extracted from command output- Returns:
thisBuilder
-
state
Sets theNetStat.BusyPort.TcpStatefor the connection.- Parameters:
state- theTcpState- Returns:
thisBuilder
-
localEndpoint
Sets the local endpoint for the connection.- Parameters:
endpoint- the local endpoint- Returns:
thisBuilder- See Also:
-
localEndpoint
NetStat.BusyPort.Builder localEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port) Sets the local endpoint for the connection.- Parameters:
ipVersion- theIPVersionto use when interpreting ambiguousaddressvaluesaddress- the IP address in a form suitable toInetAddress.getByName(String); an asterisk (*) may be used to designate "any address"port- the port number for the connection; an asterisk (*) may be used to designate an unassigned port- Returns:
thisBuilder- See Also:
-
remoteEndpoint
Sets the remote endpoint for the connection.- Parameters:
endpoint- the remote endpoint- Returns:
thisBuilder- See Also:
-
remoteEndpoint
NetStat.BusyPort.Builder remoteEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port) Sets the remote endpoint for the connection.- Parameters:
ipVersion- theIPVersionto use when interpreting ambiguousaddressvaluesaddress- the IP address in a form suitable toInetAddress.getByName(String); an asterisk (*) may be used to designate "any address"port- the port number for the connection; an asterisk (*) may be used to designate an unassigned port- Returns:
thisBuilder- See Also:
-
processEndpoint
private InetSocketAddress processEndpoint(NetStat.BusyPort.IPVersion ipVersion, String address, String port)
-