Class XSingleInstanceService

    • Constructor Detail

      • XSingleInstanceService

        XSingleInstanceService()
        Create a new XSingleInstanceService
    • Method Detail

      • startListeningServer

        private void startListeningServer​(SingleInstanceLock lockFile)
        Start the listening server to accept arguments from new instances of applications
        Parameters:
        lockFile - the SingleInstanceLock that the server should use
      • sendProgramArgumentsToExistingApplication

        private void sendProgramArgumentsToExistingApplication​(int port,
                                                               java.lang.String[] arguments)
                                                        throws java.io.IOException
        Send the arguments for this application to the main instance
        Parameters:
        port - the port at which the SingleInstanceServer is listening at
        arguments - the new arguments
        Throws:
        java.io.IOException - on any io exception
      • notifySingleInstanceListeners

        private void notifySingleInstanceListeners​(java.lang.String[] arguments)
        Notify any SingleInstanceListener with new arguments
        Parameters:
        arguments - the new arguments to the application