jaugment2.ticker
Class TickerService

java.lang.Object
  |
  +--java.rmi.server.RemoteObject
        |
        +--java.rmi.server.RemoteServer
              |
              +--java.rmi.server.UnicastRemoteObject
                    |
                    +--jaugment2.jini.simpleService.simpleService
                          |
                          +--jaugment2.ticker.TickerService

public class TickerService
extends simpleService
implements java.rmi.Remote

Service providing a ticker for urgent messages

See Also:
Serialized Form

Inner classes inherited from class jaugment2.jini.simpleService.simpleService
simpleService.myServiceIDListener
 
Field Summary
private static boolean debug
           
private  SimpleLandlord landLord
           
private  java.lang.String lastmsg
           
private  java.util.LinkedList[] listenerRegistrations
           
(package private)  int maxlen
           
(package private)  java.util.LinkedList msgs
           
private  TickerServiceProxy myproxy
           
private  SimpleLandlord.LeaseListener simpleLeaselistener
          Helper-class for our Landlord.
 
Fields inherited from class jaugment2.jini.simpleService.simpleService
bindings, fallback_attrSets, jmngr, ldm, lrm, persistentState, proxy, sid, simpleservicedebugMessages
 
Fields inherited from class java.rmi.server.UnicastRemoteObject
csf, port, portFactoryParamTypes, portParamTypes, serialVersionUID, ssf
 
Fields inherited from class java.rmi.server.RemoteServer
log, logname, serialVersionUID
 
Fields inherited from class java.rmi.server.RemoteObject
ref, serialVersionUID
 
Constructor Summary
TickerService()
           
TickerService(net.jini.core.discovery.LookupLocator locallocator)
           
 
Method Summary
 net.jini.core.lease.Lease addListener(net.jini.core.event.RemoteEventListener listener, java.rmi.MarshalledObject handback, int registerfor)
          Subscribe for events
 void addMessage(java.lang.String msg)
           
 void destroy()
          stop this service, destroy any persistent storage and exit
private  void fireEvent(int type, java.lang.String line)
           
private  void loadMe()
          Load our state (e.g.
 void restart()
          restart this service once it has been stopped
 void stop(boolean exit)
          stop this service.
 
Methods inherited from class jaugment2.jini.simpleService.simpleService
, deinit, deinitBindings, finalize, getProxy, getServiceItem, getStorageLocation, init, initBindings, initBindings, load, save, setStorageLocation
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, exportObject, readObject, reexport, 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, writeObject
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

myproxy

private TickerServiceProxy myproxy

lastmsg

private java.lang.String lastmsg

debug

private static final boolean debug

listenerRegistrations

private java.util.LinkedList[] listenerRegistrations

simpleLeaselistener

private SimpleLandlord.LeaseListener simpleLeaselistener
Helper-class for our Landlord.

landLord

private SimpleLandlord landLord

msgs

java.util.LinkedList msgs

maxlen

int maxlen
Constructor Detail

TickerService

public TickerService()
              throws java.rmi.RemoteException

TickerService

public TickerService(net.jini.core.discovery.LookupLocator locallocator)
              throws java.rmi.RemoteException
Method Detail

loadMe

private void loadMe()
Load our state (e.g. attrubutes, service-id) from persistent storage

restart

public void restart()
             throws java.lang.Exception
restart this service once it has been stopped
Overrides:
restart in class simpleService
See Also:
stop

stop

public void stop(boolean exit)
          throws java.lang.Exception
stop this service. If exit is false all references to this service are still valid but it has deregistered everywhere. (this includes the RMI-activation-daemon)
Overrides:
stop in class simpleService
Parameters:
exit - stop running
See Also:
restart, destroy

destroy

public void destroy()
             throws java.rmi.RemoteException
stop this service, destroy any persistent storage and exit
Overrides:
destroy in class simpleService

fireEvent

private void fireEvent(int type,
                       java.lang.String line)

addListener

public net.jini.core.lease.Lease addListener(net.jini.core.event.RemoteEventListener listener,
                                             java.rmi.MarshalledObject handback,
                                             int registerfor)
                                      throws java.rmi.RemoteException,
                                             net.jini.core.lease.LeaseDeniedException,
                                             java.lang.IllegalStateException
Subscribe for events

addMessage

public void addMessage(java.lang.String msg)