chapters.mdc
Class NumberCruncherServer

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by chapters.mdc.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:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
NumberCruncherServer()
           
 
Method Summary
static void delay(int millis)
           
 int[] factor(int number)
          Factor a positive integer number and return its distinct factor's as an integer array.
static void main(String[] args)
           
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NumberCruncherServer

public NumberCruncherServer()
                     throws RemoteException
Throws:
RemoteException
Method Detail

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

delay

public static void delay(int millis)

main

public static void main(String[] args)


Copyright © 2005-2013 QOS.ch. All Rights Reserved.