I'm portuguese and i've never work with jini, althougt i've some knowledge in java, but that was a long time ago. But now i have to do a small aplication for university and i really need all help i can get...please. What i need to do it's build the classes that could resolve the following problem:
1- Interfaces and Classes from server side The classe EventGeneratorRmi wich gives a notification service Jini events. This class should implements an remote interface EventGenerator that enables one client register interest in the events that she creates, like:
public interface EventGenerator extends Remote { public EventRegistration register( long evId, RemoteEventListener toInform) throws RemoteException, UnknowEventException; }
Just for simplicity, the method register just includes the event identifier and one reference to the object that shoul be notify. If the arg evId <> 0, register should mark an UnknownEventException.
The class EventGeneratorRmi not only has to implement an EventGenerator interface , but also should include the method void fireEvent(). This method notify the occurence of the event listener registered more recently, if any.
This class should keep one event ocorrencies conter, through to the event listener in the field seqNum of the notify() argument.
The EventServer class it's the class with the main() method, creates one object from EventGeneratorRmi class, register in the Lookup Server and in each 5 secounds invoks the fireEvent() methos from that object.
2- Interfaces and Classes from Cliente side The EventHandler class implements the net.jini.core.event.RemoteEventListener interface. His notify() method should only print one message that check the right execution of the aplication.
The EventClient class it's the classe with the main() method that creates one object EventHandler and register for alarm notification in the service gived by EventGeneratorRmi object. This object it's found from Lookup Service of Jini.
This is what i have to do.....asap :-(
If anyone can help or give me the url from a site where i can find the code....
Thanks a lot... Paulo email: paulo-cardoso@netcabo.pt