Interface ServerContext

  • All Known Implementing Classes:
    ServerContextImpl

    public interface ServerContext
    The class representing a PVA Server context.
    Version:
    $Id$
    Author:
    Matej Sekoranja
    • Method Detail

      • getVersion

        Version getVersion()
        Get context implementation version.
        Returns:
        version of the context implementation.
      • run

        void run​(int seconds)
          throws PVAException,
                 IllegalStateException
        Run server (process events).
        Parameters:
        seconds - time in seconds the server will process events (method will block), if 0 the method would block until destroy() is called.
        Throws:
        IllegalStateException - if server is already destroyed.
        PVAException - any other PVA exception.
      • shutdown

        void shutdown()
               throws PVAException,
                      IllegalStateException
        Shutdown (stop executing run() method) of this context. After shutdown Context cannot be rerun again, destroy() has to be called to clear all used resources.
        Throws:
        PVAException - any other PVA exception.
        IllegalStateException - if the context has been destroyed.
      • printInfo

        void printInfo()
        Prints detailed information about the context to the standard output stream.
      • printInfo

        void printInfo​(PrintStream out)
        Prints detailed information about the context to the specified output stream.
        Parameters:
        out - output stream.
      • dispose

        void dispose()
        Dispose (destroy) server context. This calls destroy() and silently handles all exceptions.
      • setBeaconServerStatusProvider

        void setBeaconServerStatusProvider​(BeaconServerStatusProvider beaconServerStatusProvider)
        Set beacon server status provider.
        Parameters:
        beaconServerStatusProvider - BeaconServerStatusProvider implementation to set.