Code cleanup:
- Increased MessageHandler encapsulation.
- Removed ServerHandler.closeSession() because it is adding unnecessary complexity in understanding calling sites.
MessageHandler.java:
Reduced class visibility to package private. Did the same for a few methods.
Made several fields private for better encapsulation.
Renamed getDomain() to setDomain().
In setBaseDNAndDomain(), changed the code to always set the ReplicationServerDomain, so it can never be null. Avoids any NPE + allows to remove null checks.
DataServerHandler.java:
In receiveNewStatus(), consequence of the change to MessageHandler: removed null check on replicationServerDomain.
ECLServerHandler.java, ReplicationServerHandler.java:
Consequence of the change to MessageHandler: removed null check on replicationServerDomain.
ServerHandler.java:
Consequence of the change to MessageHandler: removed null check on replicationServerDomain.
Removed closeSession() because it is adding unnecessary complexity in understanding calling sites.
In abortStart(), inlined the code of closeSession().
Removed the unneeded overriding methods for getInCount() and getOutCount().
ReplicationServer.java:
Consequence of removing ServerHandler.closeSession().