Class SocketAddressQueryCallbackHandler
- java.lang.Object
-
- org.wildfly.security.auth.callback.SocketAddressQueryCallbackHandler
-
- All Implemented Interfaces:
CallbackHandler
public final class SocketAddressQueryCallbackHandler extends Object implements CallbackHandler
A callback handler which delegates to another callback handler, passing the local and/or peer socket address to that callback handler on its first invocation.- Author:
- David M. Lloyd
-
-
Field Summary
Fields Modifier and Type Field Description private CallbackHandler
delegate
private SocketAddress
localAddress
private AtomicBoolean
once
private SocketAddress
peerAddress
-
Constructor Summary
Constructors Constructor Description SocketAddressQueryCallbackHandler(CallbackHandler delegate, SocketAddress localAddress, SocketAddress peerAddress)
Construct a new instance.
-
-
-
Field Detail
-
delegate
private final CallbackHandler delegate
-
localAddress
private final SocketAddress localAddress
-
peerAddress
private final SocketAddress peerAddress
-
once
private final AtomicBoolean once
-
-
Constructor Detail
-
SocketAddressQueryCallbackHandler
public SocketAddressQueryCallbackHandler(CallbackHandler delegate, SocketAddress localAddress, SocketAddress peerAddress)
Construct a new instance.- Parameters:
delegate
- the callback handler to delegate tolocalAddress
- the local socket addresspeerAddress
- the peer socket address
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException
- Specified by:
handle
in interfaceCallbackHandler
- Throws:
IOException
UnsupportedCallbackException
-
-