org.jgroups.stack
Class DiagnosticsHandler
java.lang.Object
org.jgroups.stack.DiagnosticsHandler
- All Implemented Interfaces:
- java.lang.Runnable
public class DiagnosticsHandler
- extends java.lang.Object
- implements java.lang.Runnable
- Since:
- 3.0
- Author:
- Bela Ban
Constructor Summary |
DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
java.util.List<java.net.NetworkInterface> bind_interfaces,
int diagnostics_ttl,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory,
java.lang.String passcode)
|
DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory)
|
DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory,
java.lang.String passcode)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
THREAD_NAME
public static final java.lang.String THREAD_NAME
- See Also:
- Constant Field Values
thread
protected java.lang.Thread thread
diag_sock
protected java.net.MulticastSocket diag_sock
diagnostics_addr
protected java.net.InetAddress diagnostics_addr
diagnostics_port
protected int diagnostics_port
ttl
protected int ttl
bind_interfaces
protected java.util.List<java.net.NetworkInterface> bind_interfaces
handlers
protected final java.util.Set<DiagnosticsHandler.ProbeHandler> handlers
log
protected final Log log
socket_factory
protected final SocketFactory socket_factory
thread_factory
protected final ThreadFactory thread_factory
passcode
protected final java.lang.String passcode
DiagnosticsHandler
public DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory)
DiagnosticsHandler
public DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory,
java.lang.String passcode)
DiagnosticsHandler
public DiagnosticsHandler(java.net.InetAddress diagnostics_addr,
int diagnostics_port,
java.util.List<java.net.NetworkInterface> bind_interfaces,
int diagnostics_ttl,
Log log,
SocketFactory socket_factory,
ThreadFactory thread_factory,
java.lang.String passcode)
getThread
public java.lang.Thread getThread()
getProbeHandlers
public java.util.Set<DiagnosticsHandler.ProbeHandler> getProbeHandlers()
registerProbeHandler
public void registerProbeHandler(DiagnosticsHandler.ProbeHandler handler)
unregisterProbeHandler
public void unregisterProbeHandler(DiagnosticsHandler.ProbeHandler handler)
start
public void start()
throws java.io.IOException
- Throws:
java.io.IOException
stop
public void stop()
run
public void run()
- Specified by:
run
in interface java.lang.Runnable
handleDiagnosticProbe
protected void handleDiagnosticProbe(java.net.SocketAddress sender,
java.net.DatagramSocket sock,
java.lang.String request)
authorizeProbeRequest
protected int authorizeProbeRequest(java.net.DatagramPacket packet)
throws java.lang.Exception
- Performs authorization on given DatagramPacket.
- Parameters:
packet
- to authorize
- Returns:
- offset in DatagramPacket where request payload starts
- Throws:
java.lang.Exception
- thrown if passcode received from client does not match set passcode
sendResponse
protected static void sendResponse(java.net.DatagramSocket sock,
java.net.SocketAddress sender,
byte[] buf)
throws java.io.IOException
- Throws:
java.io.IOException
bindToInterfaces
protected void bindToInterfaces(java.util.List<java.net.NetworkInterface> interfaces,
java.net.MulticastSocket s)
isAuthorizationRequired
protected boolean isAuthorizationRequired()
Copyright © 1998-2012 Bela Ban / Red Hat. All Rights Reserved.