Skip to main content
Notice removed Draw attention by flakes
Bounty Ended with Heslacher's answer chosen by flakes
Tweeted twitter.com/#!/StackCodeReview/status/637312594034970625
Notice added Draw attention by flakes
Bounty Started worth 50 reputation by flakes
added 43 characters in body
Source Link
flakes
  • 1.9k
  • 1
  • 16
  • 28

The useHere is an example of this tool would then simply behow a client can use the service to perform work on the server:

The use of this tool would then simply be:

Here is an example of how a client can use the service to perform work on the server:

deleted 2 characters in body; edited tags
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

The location information for the Server is maintained in a ConfigurationConfiguration class:

And here is the ServiceService. If the server has not yet been connected, the service will attempt to do a registry lookup on the server. If the registry lookup up was successful (or has already been performed), it will check the server connectivity before performing any tasks.

The location information for the Server is maintained in a Configuration class:

And here is the Service. If the server has not yet been connected, the service will attempt to do a registry lookup on the server. If the registry lookup up was successful (or has already been performed), it will check the server connectivity before performing any tasks.

The location information for the Server is maintained in a Configuration class:

And here is the Service. If the server has not yet been connected, the service will attempt to do a registry lookup on the server. If the registry lookup up was successful (or has already been performed), it will check the server connectivity before performing any tasks.

added 5 characters in body
Source Link
flakes
  • 1.9k
  • 1
  • 16
  • 28
final class ComputeServer extends UnicastRemoteObject implements ComputeTaskComputeInterface {
    public static void main(String[] args) throws RemoteException, AlreadyBoundException {
        ComputeServer computeServer = new ComputeServer();
        Registry registry = LocateRegistry.createRegistry(Configuration.COMPUTE_REMOTE_PORT);
        registry.bind(Configuration.COMPUTE_REMOTE_ID, computeServer);
        System.out.println("Control"Compute Server Running");
    }

    private ComputeServer() throws RemoteException {
        super();
    }

    @Override
    public synchronized ComputeTask compute(ComputeTask task) throws RemoteException{
        task.doWork();
        return task;
    }

    @Override
    public synchronized boolean isConnected() throws RemoteException{
        return true;
    }
}
final class ComputeServer extends UnicastRemoteObject implements ComputeTask {
    public static void main(String[] args) throws RemoteException, AlreadyBoundException {
        ComputeServer computeServer = new ComputeServer();
        Registry registry = LocateRegistry.createRegistry(Configuration.COMPUTE_REMOTE_PORT);
        registry.bind(Configuration.COMPUTE_REMOTE_ID, computeServer);
        System.out.println("Control Server Running");
    }

    private ComputeServer() throws RemoteException {
        super();
    }

    @Override
    public synchronized ComputeTask compute(ComputeTask task) throws RemoteException{
        task.doWork();
        return task;
    }

    @Override
    public synchronized boolean isConnected() throws RemoteException{
        return true;
    }
}
final class ComputeServer extends UnicastRemoteObject implements ComputeInterface {
    public static void main(String[] args) throws RemoteException, AlreadyBoundException {
        ComputeServer computeServer = new ComputeServer();
        Registry registry = LocateRegistry.createRegistry(Configuration.COMPUTE_REMOTE_PORT);
        registry.bind(Configuration.COMPUTE_REMOTE_ID, computeServer);
        System.out.println("Compute Server Running");
    }

    private ComputeServer() throws RemoteException {
        super();
    }

    @Override
    public synchronized ComputeTask compute(ComputeTask task) throws RemoteException{
        task.doWork();
        return task;
    }

    @Override
    public synchronized boolean isConnected() throws RemoteException{
        return true;
    }
}
added 1 character in body
Source Link
flakes
  • 1.9k
  • 1
  • 16
  • 28
Loading
Source Link
flakes
  • 1.9k
  • 1
  • 16
  • 28
Loading