com.microfocus.awm.core

## Class LocalSystemImage

- java.lang.Object
- - com.microfocus.awm.core.LocalSystemImage

- All Implemented Interfaces:
    ISystemImage

      public class LocalSystemImage
      extends java.lang.Object
      implements ISystemImage

  Implementation of the `ISystemImage` for the local operating system. Copyright (C) Micro Focus
  Author:
    Ralf Pakosch

- - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `EHostCodepage` | `getEncoding()`
    `java.lang.String` | `getHostName()`
    `static LocalSystemImage` | `getInstance()` Gets the local system image singleton instance.
    `ELocalCodepage` | `getLocalCharset()`
    `java.lang.String` | `getName()` Returns the logical, unique name of the system.
    `java.lang.String` | `getPassword()`
    `int` | `getPort()`
    `java.lang.Object` | `getSystemImplementation()` returns an object implementing this interface
    `java.lang.String` | `getType()` Returns a unique system type.
    `java.lang.String` | `getUserID()` Returns the user id of the user who is currently connected to this system image.
    `boolean` | `isConnected()`
    `boolean` | `isConnecting()`

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

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

- - ### Method Detail

    - #### getInstance

          public static LocalSystemImage getInstance()

      Gets the local system image singleton instance.
      Returns:
        the instance

    - #### 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

    - #### 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

    - #### 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.

    - #### getName

          public java.lang.String getName()

      Description copied from interface: `ISystemImage`
      Returns the logical, unique name of the system. It is used to identify system images, i.a. when AWM systems are being restored from cache.

      Note: The name `Local` is reserved by AWM and should not be used by any other implementations.

      Specified by:
        `getName` in interface `ISystemImage`
      Returns:
        the unique name of the system image

    - #### isConnected

          public boolean isConnected()

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

    - #### getHostName

          public java.lang.String getHostName()

      Specified by:
        `getHostName` in interface `ISystemImage`
      Returns:
        the system's IP address

    - #### getPort

          public int getPort()

      Specified by:
        `getPort` in interface `ISystemImage`
      Returns:
        the port of the system

    - #### 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()`

    - #### isConnecting

          public boolean isConnecting()

      Specified by:
        `isConnecting` in interface `ISystemImage`
      Returns:
        `true` if the system is currently connecting

    - #### 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

    - #### 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.

Copyright © 2015 Micro Focus GmbH. All rights reserved.