Class SocketAddress
- java.lang.Object
-
- org.apache.logging.log4j.core.net.SocketAddress
-
@Plugin(name="SocketAddress", category="Core", printObject=true) public class SocketAddress extends Object
Plugin to hold a hostname and port (socket address).- Since:
- 2.8
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SocketAddress.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InetAddress
getAddress()
String
getHostName()
static SocketAddress
getLoopback()
Creates a SocketAddress corresponding tolocalhost:0
.int
getPort()
InetSocketAddress
getSocketAddress()
static SocketAddress.Builder
newBuilder()
String
toString()
-
-
-
Method Detail
-
getLoopback
public static SocketAddress getLoopback()
Creates a SocketAddress corresponding tolocalhost:0
.- Returns:
- a SocketAddress for
localhost:0
-
getSocketAddress
public InetSocketAddress getSocketAddress()
-
getPort
public int getPort()
-
getAddress
public InetAddress getAddress()
-
getHostName
public String getHostName()
-
newBuilder
@PluginBuilderFactory public static SocketAddress.Builder newBuilder()
-
-