com.microfocus.zserver.zexplorer

## Class ZExplorerConnectorService

- java.lang.Object
- - AbstractConnectorService
  - - com.microfocus.zserver.zexplorer.ZExplorerConnectorService

- All Implemented Interfaces:
    ISystemImage, java.util.Observer, org.eclipse.ui.IWorkbenchListener

      public class ZExplorerConnectorService
      extends AbstractConnectorService
      implements ISystemImage, org.eclipse.ui.IWorkbenchListener, java.util.Observer

  Base Class for a z/OS connection. Manages the connect state of a user, including its userid and password.

  Note that this is the zExplorer implementation of the `ISystemImage`.

  Author:
    Ralf Pakosch
  See Also:
    `AbstractConnectorService`

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `PROPERTY_HOST_CP`
    `static java.lang.String` | `PROPERTY_LOCAL_CP`
    `static java.lang.String` | `PROPSET_CODEPAGES`
    `static java.lang.String` | `SYSTEM_TYPE_ID` ID of the z/Server RSE system type.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ZExplorerConnectorService(java.lang.String pName, java.lang.String pDescription, IHost pHost, int pPort)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `acquireCredentials(boolean pRefresh)`
    `void` | `changePassword(SystemMessage pSysMsg)`
    `void` | `clearCredentials()`
    `void` | `clearPassword(boolean pPersist, boolean pPropagate)`
    `void` | `connectSystem(org.eclipse.core.runtime.IProgressMonitor pMon)` Establishes a connection to the remote system.
    `void` | `disconnectSystem(org.eclipse.core.runtime.IProgressMonitor pMon)` Disconnects the system.
    `ICredentials` | `getCredentials()`
    `EHostCodepage` | `getEncoding()`
    `EHostCodepage` | `getHostCodepage()`
    `ISubSystem` | `getJESSubSystem()`
    `ELocalCodepage` | `getLocalCharset()`
    `ELocalCodepage` | `getLocalCodepage()`
    `MvsSubsystem` | `getMVSSubSystem()`
    `java.lang.String` | `getPassword()`
    `java.lang.Object` | `getSystemImplementation()` returns an object implementing this interface
    `ITaurusSystem` | `getTaurusSystem()` Gets the AWM system that is associated to this z/Server connection.
    `java.lang.String` | `getType()` Returns a unique system type.
    `java.lang.String` | `getUserId()`
    `java.lang.String` | `getUserID()` Returns the user id of the user who is currently connected to this system image.
    `IUssSubSystem` | `getUSSubSystem()`
    `java.lang.String` | `getVersionReleaseModification()`
    `boolean` | `hasPassword(boolean pPersistent)`
    `boolean` | `inheritsCredentials()`
    `boolean` | `isConnected()`
    `boolean` | `isConnecting()`
    `boolean` | `isSuppressed()`
    `boolean` | `killOpenTaurusProcesses()` Displays a confirmation dialog whether to stop any running z/Server user servers used for ISPF dialog communication.
    `void` | `postShutdown(org.eclipse.ui.IWorkbench pArg0)`
    `boolean` | `preShutdown(org.eclipse.ui.IWorkbench pWorkbench, boolean pForce)`
    `void` | `removePassword()`
    `void` | `removeUserId()`
    `boolean` | `requiresPassword()`
    `boolean` | `requiresUserId()`
    `java.lang.String` | `resolveUserIDVariable(java.lang.String pFilterString)` Resolves `%userid%` and `&userid.` to the user ID of the last connected (or default) user name.
    `void` | `savePassword()`
    `void` | `saveUserId()`
    `void` | `setAbortDisconnect(boolean pAbortDisconnect)` Used to be called by an object that listens on the BEFORE_DISCONNECT CommunicationsEvent.
    `void` | `setPassword(java.lang.String pMatchingUserId, java.lang.String pPassword, boolean pPersist, boolean pPropagate)`
    `void` | `setSuppressed(boolean pSuppress)`
    `void` | `setUserId(java.lang.String pUserId)`
    `boolean` | `sharesCredentials()`
    `boolean` | `supportsPassword()`
    `boolean` | `supportsUserId()`
    `void` | `update(java.util.Observable pO, java.lang.Object pNotification)`
    `static void` | `waitForNextPassTicketRequest()` Waits at least 1100 milliseconds between being called.

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

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

    - ### Methods inherited from interface com.microfocus.awm.remote.ISystemImage

      `getHostName, getName, getPort`

- - ### Field Detail

    - #### SYSTEM_TYPE_ID

          public static final java.lang.String SYSTEM_TYPE_ID

      ID of the z/Server RSE system type.
      See Also:
        Constant Field Values

    - #### PROPERTY_LOCAL_CP

          public static final java.lang.String PROPERTY_LOCAL_CP

      See Also:
        Constant Field Values

    - #### PROPERTY_HOST_CP

          public static final java.lang.String PROPERTY_HOST_CP

      See Also:
        Constant Field Values

    - #### PROPSET_CODEPAGES

          public static final java.lang.String PROPSET_CODEPAGES

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### ZExplorerConnectorService

          public ZExplorerConnectorService(java.lang.String pName,
                                           java.lang.String pDescription,
                                           IHost pHost,
                                           int pPort)

  - ### Method Detail

    - #### getLocalCodepage

          public ELocalCodepage getLocalCodepage()

    - #### getHostCodepage

          public EHostCodepage getHostCodepage()

    - #### isConnected

          public boolean isConnected()

      Specified by:
        `isConnected` in interface `ISystemImage`
      Returns:
        `true` if there is an active connection to the remote system. `false` otherwise.

    - #### getVersionReleaseModification

          public java.lang.String getVersionReleaseModification()

    - #### supportsUserId

          public boolean supportsUserId()

    - #### supportsPassword

          public boolean supportsPassword()

    - #### getUserId

          public java.lang.String getUserId()

    - #### getCredentials

          public ICredentials getCredentials()

    - #### setUserId

          public void setUserId(java.lang.String pUserId)

    - #### saveUserId

          public void saveUserId()

    - #### removeUserId

          public void removeUserId()

    - #### setPassword

          public void setPassword(java.lang.String pMatchingUserId,
                                  java.lang.String pPassword,
                                  boolean pPersist,
                                  boolean pPropagate)

    - #### getMVSSubSystem

          public MvsSubsystem getMVSSubSystem()

    - #### getUSSubSystem

          public IUssSubSystem getUSSubSystem()

      Returns:
        the USS Subsystem.

    - #### savePassword

          public void savePassword()

    - #### removePassword

          public void removePassword()

    - #### clearPassword

          public void clearPassword(boolean pPersist,
                                    boolean pPropagate)

    - #### hasPassword

          public boolean hasPassword(boolean pPersistent)

    - #### inheritsCredentials

          public boolean inheritsCredentials()

    - #### sharesCredentials

          public boolean sharesCredentials()

    - #### clearCredentials

          public void clearCredentials()

    - #### acquireCredentials

          public void acquireCredentials(boolean pRefresh)
                                  throws org.eclipse.core.runtime.OperationCanceledException

      Throws:
        `org.eclipse.core.runtime.OperationCanceledException`

    - #### isSuppressed

          public boolean isSuppressed()

    - #### setSuppressed

          public void setSuppressed(boolean pSuppress)

    - #### requiresPassword

          public boolean requiresPassword()

    - #### changePassword

          public void changePassword(SystemMessage pSysMsg)

    - #### requiresUserId

          public boolean requiresUserId()

    - #### isConnecting

          public boolean isConnecting()

      Specified by:
        `isConnecting` in interface `ISystemImage`
      Returns:
        `true` if the ConnectorService is currently trying to connect to the host

    - #### connectSystem

          public void connectSystem(org.eclipse.core.runtime.IProgressMonitor pMon)
                             throws java.io.IOException

      Description copied from interface: `ISystemImage`
      Establishes a connection to the remote system.
      Specified by:
        `connectSystem` in interface `ISystemImage`
      Parameters:
        `pMon` - progress monitor
      Throws:
        `java.io.IOException` - if the connection could not be established

    - #### getUserID

          public java.lang.String getUserID()

      Description copied from interface: `ISystemImage`
      Returns the user id of the user who is currently connected to this system image.
      Specified by:
        `getUserID` in interface `ISystemImage`
      Returns:
        the ID of the connected user or `null` if the system image is not connected.

    - #### disconnectSystem

          public void disconnectSystem(org.eclipse.core.runtime.IProgressMonitor pMon)
                                throws java.io.IOException

      Description copied from interface: `ISystemImage`
      Disconnects the system. Does nothing if the system is not connected.
      Specified by:
        `disconnectSystem` in interface `ISystemImage`
      Parameters:
        `pMon` - progress monitor
      Throws:
        `java.io.IOException` - if the disconnect fails e.g. because of network problems

    - #### getPassword

          public java.lang.String getPassword()

      Specified by:
        `getPassword` in interface `ISystemImage`
      Returns:
        the corresponding password for the used user id
      See Also:
        `ISystemImage.getUserID()`

    - #### waitForNextPassTicketRequest

          public static void waitForNextPassTicketRequest()

      Waits at least 1100 milliseconds between being called. This is to prevent any pass ticket providers to generate more than one z/OS pass tickets under one second, which might cause the same pass ticket to be generated twice.

      Does not wait when being called for the first time, or if the last method call was longer than 1100 milliseconds ago.

    - #### getEncoding

          public EHostCodepage getEncoding()

      Specified by:
        `getEncoding` in interface `ISystemImage`
      Returns:
        the encoding charset of this system

    - #### getLocalCharset

          public ELocalCodepage getLocalCharset()

      Specified by:
        `getLocalCharset` in interface `ISystemImage`
      Returns:
        the (configured) local charset

    - #### getSystemImplementation

          public java.lang.Object getSystemImplementation()

      Description copied from interface: `ISystemImage`
      returns an object implementing this interface
      Specified by:
        `getSystemImplementation` in interface `ISystemImage`
      Returns:
        object implementing this interface

    - #### getTaurusSystem

          public ITaurusSystem getTaurusSystem()

      Gets the AWM system that is associated to this z/Server connection.
      Returns:
        the associated AWM system or `null` if the connection was not established yet

    - #### postShutdown

          public void postShutdown(org.eclipse.ui.IWorkbench pArg0)

      Specified by:
        `postShutdown` in interface `org.eclipse.ui.IWorkbenchListener`

    - #### preShutdown

          public boolean preShutdown(org.eclipse.ui.IWorkbench pWorkbench,
                                     boolean pForce)

      Specified by:
        `preShutdown` in interface `org.eclipse.ui.IWorkbenchListener`

    - #### killOpenTaurusProcesses

          public boolean killOpenTaurusProcesses()

      Displays a confirmation dialog whether to stop any running z/Server user servers used for ISPF dialog communication.
      Returns:
        whether the user confirmed the message dialog

    - #### update

          public void update(java.util.Observable pO,
                             java.lang.Object pNotification)

      Specified by:
        `update` in interface `java.util.Observer`

    - #### getType

          public java.lang.String getType()

      Description copied from interface: `ISystemImage`
      Returns a unique system type.
      Specified by:
        `getType` in interface `ISystemImage`
      Returns:
        the system type.

    - #### setAbortDisconnect

          public void setAbortDisconnect(boolean pAbortDisconnect)

      Used to be called by an object that listens on the BEFORE_DISCONNECT CommunicationsEvent.
      Parameters:
        `pAbortDisconnect` - true = abort the disconnect

    - #### getJESSubSystem

          public ISubSystem getJESSubSystem()

      Returns:
        the JES sub system instance

    - #### resolveUserIDVariable

          public java.lang.String resolveUserIDVariable(java.lang.String pFilterString)

      Resolves `%userid%` and `&userid.` to the user ID of the last connected (or default) user name.
      Parameters:
        `pFilterString` - the string to resolve
      Returns:
        the string with resolved user ID variables

Copyright © 2015 Micro Focus GmbH. All rights reserved.