nn.pp.vmcore

## Interface VMCore

-     public interface VMCore

  The main interface of VmCore which defines all the methods.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `VMCore.DriveType` The type of a redirected drive
    `static class` | `VMCore.LockFailBehavior` Enumeration for locking failure behavior

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addNotificationListener(NotificationListener listener)` Adds the specified Notification listener to receive notification events.
    `void` | `addVirtualMediaEventListener(VirtualMediaEventListener listener, int mask)` Adds the specified Virtual Media Event listener to receive VM events.
    `void` | `connectVMWithEricKey(java.lang.String host, int port, boolean sslMode, java.lang.String portID, int rfbSessionId, RedirectableObject redirectable, boolean readOnly, VMCore.LockFailBehavior lockBehavior, java.lang.String ericKey)` Connect using an eRic webs session key.
    `void` | `connectVMWithRdmSession(java.lang.String host, int port, boolean sslMode, java.lang.String portID, int rfbSessionId, RedirectableObject redirectable, boolean readOnly, VMCore.LockFailBehavior lockBehavior, java.lang.String rdmSession, java.lang.String proxyConnectionIdVM, java.lang.String proxyUseSSL)` Connect using a RDM Session ID and key.
    `void` | `connectVMWithUserLogin(java.lang.String host, int port, boolean sslMode, java.lang.String portID, int rfbSessionId, RedirectableObject redirectable, boolean readOnly, VMCore.LockFailBehavior lockBehavior, java.lang.String username, java.lang.String password)` Connect using a user name and a password.
    `void` | `disconnect()` Disconnect from the `VMCore`
    `void` | `disconnect(boolean abnormalTermination)` Disconnect from the `VMCore`
    `void` | `dispose()` If you don't need the core any longer, call this `dispose()` method.
    `void` | `removeNotificationListener(NotificationListener listener)` Removes the specified Notification listener
    `void` | `removeVirtualMediaEventListener(VirtualMediaEventListener listener)` Removes the specified Virtual Media Event listener
    `void` | `setMsIndex(int index)` Set the Mass Storage Index, if the index needs to be changed later
    `void` | `setSslSocketFactory(javax.net.ssl.SSLSocketFactory factory, boolean verifyHostname)` Set the SSL socket factory that is used by the connection and whether a host name verification should be performed additionally to certificate checks.

- - ### Method Detail

    - #### dispose

          void dispose()

      If you don't need the core any longer, call this `dispose()` method.

    - #### setSslSocketFactory

          void setSslSocketFactory(javax.net.ssl.SSLSocketFactory factory,
                                   boolean verifyHostname)

      Set the SSL socket factory that is used by the connection and whether a host name verification should be performed additionally to certificate checks.

      By default, an SSL socket factory which does not perform any checks is used and host name verification is off. This is a potential security risk. If you want to change that, use a different SSL socket factory.

      VMCore SSL implementation can be configured to use different SSL socket factories in order to implement certificate checking and other things. By default, an SSL socket factory is used which does not perform any security checks at all.

      Parameters:
        `factory` - The SSL socket factory to use
        `verifyHostname` - Whether host name verification should be performed

    - #### connectVMWithUserLogin

          void connectVMWithUserLogin(java.lang.String host,
                                      int port,
                                      boolean sslMode,
                                      java.lang.String portID,
                                      int rfbSessionId,
                                      RedirectableObject redirectable,
                                      boolean readOnly,
                                      VMCore.LockFailBehavior lockBehavior,
                                      java.lang.String username,
                                      java.lang.String password)
                               throws java.io.IOException,
                                      VMException

      Connect using a user name and a password.
      Parameters:
        `host` - host to connect to
        `port` - port number on which the connection is to be made to the host
        `sslMode` - value for ssl mode
        `portID` - unique port ID to connect to
        `rfbSessionId` - RFB session ID to connect this VM session to
        `redirectable` - the object (e.g. drive) the VM session shall be established with
        `readOnly` - read-only or read-write connection?
        `lockBehavior` - how shall the VMCore react if locking access to the drive fails?
        `username` - user name to authenticate
        `password` - password for the associated user name
      Throws:
        `java.io.IOException` - if an I/O error occurs.
        `VMException` - if an Virtual Media related error occurs
      See Also:
        `connectVMWithEricKey(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String)`, `connectVMWithRdmSession(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String, String, String)`, `disconnect()`, `VirtualMediaEventListener.driveConnected()`

    - #### connectVMWithRdmSession

          void connectVMWithRdmSession(java.lang.String host,
                                       int port,
                                       boolean sslMode,
                                       java.lang.String portID,
                                       int rfbSessionId,
                                       RedirectableObject redirectable,
                                       boolean readOnly,
                                       VMCore.LockFailBehavior lockBehavior,
                                       java.lang.String rdmSession,
                                       java.lang.String proxyConnectionIdVM,
                                       java.lang.String proxyUseSSL)
                                throws java.io.IOException,
                                       VMException

      Connect using a RDM Session ID and key.

      Pass RDM SessionID and SessionKey as follows: rdmSession = "\"" + rdmSessionId + "\":\"" + rdmSessionKey + "\""

      Parameters:
        `host` - host to connect to
        `port` - port number on which the connection is to be made to the host
        `sslMode` - value for ssl mode
        `portID` - unique port ID to connect to
        `rfbSessionId` - RFB session ID to connect this VM session to
        `redirectable` - the object (e.g. drive) the VM session shall be established with
        `readOnly` - read-only or read-write connection?
        `lockBehavior` - how shall the VMCore react if locking access to the drive fails?
        `rdmSession` - rdmSessionID and rdmSessionKey concatenated in the above format
        `proxyConnectionIdVM` - ff going through CC-SG proxy , this will contain VM connection id
        `proxyUseSSL` - if going through CC-SG proxy , SSL yes or not for proxy communication
      Throws:
        `java.io.IOException` - if an I/O error occurs.
        `VMException` - if an Virtual Media related error occurs
      See Also:
        `connectVMWithEricKey(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String)`, `connectVMWithUserLogin(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String, String)`, `disconnect()`, `VirtualMediaEventListener.driveConnected()`

    - #### connectVMWithEricKey

          void connectVMWithEricKey(java.lang.String host,
                                    int port,
                                    boolean sslMode,
                                    java.lang.String portID,
                                    int rfbSessionId,
                                    RedirectableObject redirectable,
                                    boolean readOnly,
                                    VMCore.LockFailBehavior lockBehavior,
                                    java.lang.String ericKey)
                             throws java.io.IOException,
                                    VMException

      Connect using an eRic webs session key.

      Parameters:
        `host` - host to connect to
        `port` - port number on which the connection is to be made to the host
        `sslMode` - value for ssl mode
        `portID` - unique port ID to connect to
        `rfbSessionId` - RFB session ID to connect this VM session to
        `redirectable` - the object (e.g. drive) the VM session shall be established with
        `readOnly` - read-only or read-write connection?
        `lockBehavior` - how shall the VMCore react if locking access to the drive fails?
        `ericKey` - eRic webs session key
      Throws:
        `java.io.IOException` - if an I/O error occurs.
        `VMException` - if an Virtual Media related error occurs
      See Also:
        `connectVMWithRdmSession(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String, String, String)`, `connectVMWithUserLogin(String, int, boolean, String, int, RedirectableObject, boolean, LockFailBehavior, String, String)`, `disconnect()`, `VirtualMediaEventListener.driveConnected()`

    - #### disconnect

          void disconnect()

      Disconnect from the `VMCore`

    - #### disconnect

          void disconnect(boolean abnormalTermination)

      Disconnect from the `VMCore`
      Parameters:
        `abnormalTermination` - if `false`, then the `VirtualMediaEventListener.driveDisconnectedByUser()` event is generated, if `true` it is not

    - #### addNotificationListener

          void addNotificationListener(NotificationListener listener)

      Adds the specified Notification listener to receive notification events.

      Notification events occur when there is any Error/Warning/Info needs to be sent from the server to the connected and subscribed clients.

      Parameters:
        `listener` - the Notification Listener
      See Also:
        `removeNotificationListener(NotificationListener)`

    - #### removeNotificationListener

          void removeNotificationListener(NotificationListener listener)

      Removes the specified Notification listener
      Parameters:
        `listener` - the Notification Listener
      See Also:
        `addNotificationListener(NotificationListener)`

    - #### addVirtualMediaEventListener

          void addVirtualMediaEventListener(VirtualMediaEventListener listener,
                                            int mask)

      Adds the specified Virtual Media Event listener to receive VM events.

      VM events occur if the connection is disconnected or the drive locking fails.

      Parameters:
        `listener` - the Virtual Media Event Listener
        `mask` - the event mask to register for
      See Also:
        `removeVirtualMediaEventListener(VirtualMediaEventListener)`

    - #### removeVirtualMediaEventListener

          void removeVirtualMediaEventListener(VirtualMediaEventListener listener)

      Removes the specified Virtual Media Event listener
      Parameters:
        `listener` - the Virtual Media Event Listener
      See Also:
        `addVirtualMediaEventListener(VirtualMediaEventListener, int)`

    - #### setMsIndex

          void setMsIndex(int index)

      Set the Mass Storage Index, if the index needs to be changed later
      Parameters:
        `index` - the Virtual Media Mass Storage Index

Copyright © 2025 Raritan Inc. All Rights Reserved.