Class SyncServerImpl

  • All Implemented Interfaces:
    SyncServer, java.io.Closeable, java.lang.AutoCloseable

    @Internal
    public class SyncServerImpl
    extends java.lang.Object
    implements SyncServer
    Internal sync server implementation. Use SyncServer to access functionality, this class may change without notice.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Closes and cleans up all resources used by this sync server.
      protected void finalize()
      Users of this class should explicitly call close() instead to avoid expensive finalization.
      int getPort()
      Gets the port the server has bound to.
      java.lang.String getStatsString()
      Gets some statistics from the sync server.
      java.lang.String getUrl()
      Gets the URL the server is running at.
      boolean isRunning()
      Returns if the server is up and running.
      void setSyncChangeListener​(SyncChangeListener changesListener)
      void start()
      Starts the server (e.g.
      void stop()
      Stops the server.
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        Description copied from interface: SyncServer
        Gets the URL the server is running at.
        Specified by:
        getUrl in interface SyncServer
      • getPort

        public int getPort()
        Description copied from interface: SyncServer
        Gets the port the server has bound to.
        Specified by:
        getPort in interface SyncServer
      • isRunning

        public boolean isRunning()
        Description copied from interface: SyncServer
        Returns if the server is up and running.
        Specified by:
        isRunning in interface SyncServer
      • getStatsString

        public java.lang.String getStatsString()
        Description copied from interface: SyncServer
        Gets some statistics from the sync server.
        Specified by:
        getStatsString in interface SyncServer
      • start

        public void start()
        Description copied from interface: SyncServer
        Starts the server (e.g. bind to port) and gets everything operational.
        Specified by:
        start in interface SyncServer
      • stop

        public void stop()
        Description copied from interface: SyncServer
        Stops the server.
        Specified by:
        stop in interface SyncServer
      • close

        public void close()
        Description copied from interface: SyncServer
        Closes and cleans up all resources used by this sync server. It can no longer be used afterwards, build a new sync server instead. Does nothing if this sync server has already been closed.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Specified by:
        close in interface SyncServer
      • finalize

        protected void finalize()
                         throws java.lang.Throwable
        Users of this class should explicitly call close() instead to avoid expensive finalization.
        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable