Class ConnectionInfo

java.lang.Object
com.nomagic.magicdraw.esi.session.ConnectionInfo

@OpenApi public class ConnectionInfo extends Object
Information where to connect when going online.
  • Constructor Details

    • ConnectionInfo

      public ConnectionInfo(String hostPort, @CheckForNull String userName, @CheckForNull KeyStore keyStore, @CheckForNull UUID clusterID)
      Creates and initializes a new ConnectionInfo from the specified parameters.
      Parameters:
      hostPort - host and port.
      userName - user name.
      keyStore - SSL configuration.
      clusterID - cluster ID.
    • ConnectionInfo

      public ConnectionInfo(String hostPort, @CheckForNull String userName, boolean useSSL, @CheckForNull UUID clusterID)
      Creates and initializes a new ConnectionInfo from the specified parameters.
      Parameters:
      hostPort - host and port.
      userName - user name.
      useSSL - specifies if this connection info uses SSL.
      clusterID - cluster ID.
  • Method Details

    • isUseSecureConnection

      public boolean isUseSecureConnection()
      Returns:
      true when secure connection must be used
    • getHostPort

      @OpenApi public String getHostPort()
      Returns:
      host and port
    • getConnectionRepresentation

      public String getConnectionRepresentation()
      Returns:
      connection representation
    • getUserName

      @OpenApi @CheckForNull public String getUserName()
      Returns:
      user name
    • getLoginName

      @CheckForNull public String getLoginName()
      Returns:
      user login name
    • setUserName

      public void setUserName(String userName)
      Setter for user name
      Parameters:
      userName - user name
    • getUserRepresentation

      @CheckForNull public String getUserRepresentation()
      Returns:
      user representation
    • getClusterID

      @OpenApi @CheckForNull public UUID getClusterID()
      Returns clusterID of the connection info.
      Returns:
      clusterID.
    • setClusterID

      public void setClusterID(@CheckForNull UUID clusterID)
      Sets a new clusterID.
      Parameters:
      clusterID - new cluster ID.
    • getKeystore

      @CheckForNull public KeyStore getKeystore()
      Returns:
      key store when secure connection is used, otherwise - null
    • isCompatible

      public boolean isCompatible(ConnectionInfo other)
      Checks whether the specified connection info is compatible with the current connection info. Compatible means that the connection info is from the same cluster and with the same user.
      Parameters:
      other - another connection info.
      Returns:
      true if compatible.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object