Package chapters.mdc

Class NumberCruncherServer

All Implemented Interfaces:
NumberCruncher, Serializable, Remote

public class NumberCruncherServer extends UnicastRemoteObject implements NumberCruncher
A simple NumberCruncher implementation that logs its progress when factoring numbers. The purpose of the whole exercise is to show the use of mapped diagnostic contexts in order to distinguish the log output from different client requests.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      See Also:
    • logger

      static org.slf4j.Logger logger
  • Constructor Details

  • Method Details

    • factor

      public int[] factor(int number) throws RemoteException
      Description copied from interface: NumberCruncher
      Factor a positive integer number and return its distinct factor's as an integer array.
      Specified by:
      factor in interface NumberCruncher
      Throws:
      RemoteException
    • usage

      static void usage(String msg)
    • delay

      public static void delay(int millis)
    • main

      public static void main(String[] args)