Class NetStat.BusyPort.Builder
- java.lang.Object
-
- org.terracotta.utilities.test.net.NetStat.BusyPort.Builder
-
- Enclosing class:
- NetStat.BusyPort
private static class NetStat.BusyPort.Builder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcommandLineprivate java.net.InetSocketAddresslocalEndpointprivate longprocessIdprivate java.net.InetSocketAddressremoteEndpointprivate java.lang.StringshortCommandprivate NetStat.BusyPort.TcpStatestate
-
Constructor Summary
Constructors Constructor Description Builder()Builder(NetStat.BusyPort busyPort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) NetStat.BusyPortbuild()Constructs aNetStat.BusyPortinstance from the content of thisBuilder.(package private) NetStat.BusyPort.BuildercommandLine(java.lang.String commandLine)Sets the full/long command string for the connection.(package private) NetStat.BusyPort.BuilderlocalEndpoint(java.net.InetSocketAddress endpoint)Sets the local endpoint for the connection.(package private) NetStat.BusyPort.BuilderlocalEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.String port)Sets the local endpoint for the connection.private java.net.InetSocketAddressprocessEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.String port)(package private) NetStat.BusyPort.BuilderprocessId(java.lang.String processId)Sets the process id for the connection.(package private) NetStat.BusyPort.BuilderremoteEndpoint(java.net.InetSocketAddress endpoint)Sets the remote endpoint for the connection.(package private) NetStat.BusyPort.BuilderremoteEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.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(java.lang.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 Detail
-
processId
private long processId
-
localEndpoint
private java.net.InetSocketAddress localEndpoint
-
remoteEndpoint
private java.net.InetSocketAddress remoteEndpoint
-
state
private NetStat.BusyPort.TcpState state
-
shortCommand
private java.lang.String shortCommand
-
commandLine
private java.lang.String commandLine
-
-
Constructor Detail
-
Builder
Builder()
-
Builder
Builder(NetStat.BusyPort busyPort)
-
-
Method Detail
-
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
NetStat.BusyPort.Builder processId(java.lang.String processId)
Sets the process id for the connection.- Parameters:
processId- the process id extracted from command output- Returns:
thisBuilder
-
shortCommand
NetStat.BusyPort.Builder shortCommand(java.lang.String shortCommand)
Sets the short command string for the connection.- Parameters:
shortCommand- the short command string extracted from command output- Returns:
thisBuilder
-
commandLine
NetStat.BusyPort.Builder commandLine(java.lang.String commandLine)
Sets the full/long command string for the connection.- Parameters:
commandLine- the full command string extracted from command output- Returns:
thisBuilder
-
state
NetStat.BusyPort.Builder state(NetStat.BusyPort.TcpState state)
Sets theNetStat.BusyPort.TcpStatefor the connection.- Parameters:
state- theTcpState- Returns:
thisBuilder
-
localEndpoint
NetStat.BusyPort.Builder localEndpoint(java.net.InetSocketAddress endpoint)
Sets the local endpoint for the connection.- Parameters:
endpoint- the local endpoint- Returns:
thisBuilder- See Also:
localEndpoint(IPVersion, String, String)
-
localEndpoint
NetStat.BusyPort.Builder localEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.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:
localEndpoint(InetSocketAddress)
-
remoteEndpoint
NetStat.BusyPort.Builder remoteEndpoint(java.net.InetSocketAddress endpoint)
Sets the remote endpoint for the connection.- Parameters:
endpoint- the remote endpoint- Returns:
thisBuilder- See Also:
remoteEndpoint(IPVersion, String, String)
-
remoteEndpoint
NetStat.BusyPort.Builder remoteEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.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:
remoteEndpoint(InetSocketAddress)
-
processEndpoint
private java.net.InetSocketAddress processEndpoint(NetStat.BusyPort.IPVersion ipVersion, java.lang.String address, java.lang.String port)
-
-