com.microfocus.zserver.zexplorer.internal

## Class CloseZExplorerEditorsRunnable

- java.lang.Object
- - com.microfocus.zserver.zexplorer.internal.CloseZExplorerEditorsRunnable

- All Implemented Interfaces:
    java.lang.Runnable

      public class CloseZExplorerEditorsRunnable
      extends java.lang.Object
      implements java.lang.Runnable

  Runnable to close opened editors which belong to the connection which is about to being disconnected. Should be run in UI the thread.
  Author:
    RalfP

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CloseZExplorerEditorsRunnable(ZExplorerConnectorService pZExplorerConnectorService)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `allowDisconnect()` Gets whether the connection can be disconnected safely.
    `void` | `run()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CloseZExplorerEditorsRunnable

          public CloseZExplorerEditorsRunnable(ZExplorerConnectorService pZExplorerConnectorService)

      Parameters:
        `pZExplorerConnectorService` - the connection to be disconnected

  - ### Method Detail

    - #### run

          public void run()

      Specified by:
        `run` in interface `java.lang.Runnable`

    - #### allowDisconnect

          public boolean allowDisconnect()

      Gets whether the connection can be disconnected safely. This depends on whether the user has confirmed editors to be closed and didn't press "Cancel" on "Would you like to save your changes" dialogs. Should be called after the runnable has run.
      Returns:
        `true` if the connection can be disconnected, otherwise `false`.

Copyright © 2015 Micro Focus GmbH. All rights reserved.