Lightweight Bartering Grid

lbg.protocol.rpc
Class RemoteCallDaemon

java.lang.Object
  extended by lbg.protocol.rpc.RemoteCallDaemon
All Implemented Interfaces:
java.lang.Runnable

public class RemoteCallDaemon
extends java.lang.Object
implements java.lang.Runnable

A generic daemon able to handle calls from and on all entities : peers, users and ressources. Replaces the now obsolete individual and semi-individual daemons

Author:
Xavier Dalem

Field Summary
protected  java.util.logging.Logger logger
           
 
Constructor Summary
RemoteCallDaemon(RemoteCall.CallType target_type, int target_port, java.lang.Object callHandler, RemoteCallStatusListener l)
          Create a daemon with the default number of handlers (does not start thread).
RemoteCallDaemon(RemoteCall.CallType target_type, int target_port, java.lang.Object callHandler, RemoteCallStatusListener listener, int handlers)
          Creates a daemon (does not start thread)
 
Method Summary
 void run()
          Launch the daemon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected java.util.logging.Logger logger
Constructor Detail

RemoteCallDaemon

public RemoteCallDaemon(RemoteCall.CallType target_type,
                        int target_port,
                        java.lang.Object callHandler,
                        RemoteCallStatusListener l)
                 throws GridException
Create a daemon with the default number of handlers (does not start thread).

Parameters:
target_type - The type of calls we accept (all other will be discarded)
target_port - The port to listen on
callHandler - An object that is able to handle the call of relevant type (target_type)
Throws:
GridException

RemoteCallDaemon

public RemoteCallDaemon(RemoteCall.CallType target_type,
                        int target_port,
                        java.lang.Object callHandler,
                        RemoteCallStatusListener listener,
                        int handlers)
                 throws GridException
Creates a daemon (does not start thread)

Parameters:
target_type - The type of calls we accept (all other will be discarded)
target_port - The port to listen on
callHandler - An object that is able to handle the call of relevant type (target_type)
handlers - The number of thread handlers
listener - A listener for daemon status changes (null for none)
Throws:
GridException
Method Detail

run

public void run()
Launch the daemon.

Specified by:
run in interface java.lang.Runnable

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.