public class NtpProtocolHandler
extends org.apache.mina.core.service.IoHandlerAdapter
IoHandler.messageReceived(org.apache.mina.core.session.IoSession, java.lang.Object) method,
which returns the NTP reply. The IoHandler.exceptionCaught(org.apache.mina.core.session.IoSession, java.lang.Throwable) is also implemented,
all the other methods are handled by the IoHandlerAdapter class.| Modifier and Type | Field and Description |
|---|---|
private static org.slf4j.Logger |
LOG
the log for this class
|
private NtpService |
ntpService
The NtpService instance
|
| Constructor and Description |
|---|
NtpProtocolHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
exceptionCaught(org.apache.mina.core.session.IoSession session,
java.lang.Throwable cause) |
void |
messageReceived(org.apache.mina.core.session.IoSession session,
java.lang.Object message) |
private static final org.slf4j.Logger LOG
private NtpService ntpService
public void exceptionCaught(org.apache.mina.core.session.IoSession session,
java.lang.Throwable cause)
exceptionCaught in interface org.apache.mina.core.service.IoHandlerexceptionCaught in class org.apache.mina.core.service.IoHandlerAdapterpublic void messageReceived(org.apache.mina.core.session.IoSession session,
java.lang.Object message)
messageReceived in interface org.apache.mina.core.service.IoHandlermessageReceived in class org.apache.mina.core.service.IoHandlerAdapter