Package totalcross

Class Service

  • All Implemented Interfaces:
    MainClass

    public abstract class Service
    extends java.lang.Object
    implements MainClass
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int loopDelay  
    • Constructor Summary

      Constructors 
      Constructor Description
      Service()  
      Service​(java.lang.String serviceApplicationId)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void _onTimerTick​(boolean canUpdate)
      Called by the vm when a timer event has been triggered.
      void _postEvent​(int type, int key, int x, int y, int modifiers, int timeStamp)
      Called by the vm when an event is posted
      void appEnding()
      Called by the vm when the application is ending
      void appStarting​(int timeAvail)
      Called by the vm when the application is starting
      boolean isRunning()  
      protected abstract void onService()  
      protected abstract void onStart()  
      protected abstract void onStop()  
      boolean registerService()  
      void start()  
      void stop()  
      void unregisterService()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • loopDelay

        protected int loopDelay
    • Constructor Detail

      • Service

        public Service​(java.lang.String serviceApplicationId)
      • Service

        public Service()
    • Method Detail

      • onStart

        protected abstract void onStart()
      • onService

        protected abstract void onService()
      • onStop

        protected abstract void onStop()
      • appStarting

        public final void appStarting​(int timeAvail)
        Description copied from interface: MainClass
        Called by the vm when the application is starting
        Specified by:
        appStarting in interface MainClass
      • start

        public void start()
      • stop

        public void stop()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • isRunning

        public boolean isRunning()
                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • registerService

        public boolean registerService()
      • unregisterService

        public void unregisterService()
      • _postEvent

        public void _postEvent​(int type,
                               int key,
                               int x,
                               int y,
                               int modifiers,
                               int timeStamp)
        Description copied from interface: MainClass
        Called by the vm when an event is posted
        Specified by:
        _postEvent in interface MainClass
      • appEnding

        public void appEnding()
        Description copied from interface: MainClass
        Called by the vm when the application is ending
        Specified by:
        appEnding in interface MainClass
      • _onTimerTick

        public void _onTimerTick​(boolean canUpdate)
        Description copied from interface: MainClass
        Called by the vm when a timer event has been triggered.
        Specified by:
        _onTimerTick in interface MainClass