Class ServerControlSource


  • public abstract class ServerControlSource
    extends java.lang.Object
    The ServerControlSource interface represents the entry point for the Server Control-related functionality. It contains a static method to obtain a new instance, which is the entry point for the API. Note that after using the API, it is recommended, though not required, to call the release method. This will cause the underlying C++ object to be released; this will increase the efficiency of the API's memory usage, as otherwise the C++ object will not be cleaned up until the finalizer of this object is called.
    Since:
    MicroStrategy Web 7.5.0
    • Constructor Detail

      • ServerControlSource

        public ServerControlSource()
    • Method Detail

      • getInstance

        public static ServerControlSource getInstance()
        Returns a new instance of the ServerControlSource class.
        Returns:
        A new instance of the ServerControlSource.
      • getLocalNetworkServers

        public abstract SimpleList getLocalNetworkServers()
                                                   throws ServerConfigException
        Returns a list of local network servers which contain one or more MicroStrategy products on them.
        Returns:
        A SimpleList object containing the names of the local network servers the API can find.
        Throws:
        ServerConfigException - Thrown if an error occurs when performing the operation.
      • getLocalNetworkServers

        public abstract SimpleList getLocalNetworkServers​(int serverType)
                                                   throws ServerConfigException
        Returns a list of local network servers which contain the specified type of MicroStrategy product on it.
        Parameters:
        serverType - The type of server to search for, from EnumServerTypes.
        Returns:
        A SimpleList object containing the names of the local network servers the API can find.
        Throws:
        ServerConfigException - Thrown if an error occurs when performing the operation.
      • connect

        public abstract ServerMachine connect​(java.lang.String machineName)
                                       throws ServerConfigException
        This method will connect to the given remote machine's server control facilities.
        Parameters:
        machineName - The name of the machine to connect to.
        Returns:
        A ServerMachine object referring to the local machine.
        Throws:
        ServerConfigException - Thrown if an error occurs.
      • setLocale

        public abstract void setLocale​(java.util.Locale locale)
                                throws ServerConfigException
        Sets the locale of the error messages thrown by the API.
        Parameters:
        locale - The java.lang.Locale of the user.
        Throws:
        ServerConfigException - Thrown if the locale cannot be set.
      • getLocale

        public abstract java.util.Locale getLocale()
        Returns the current locale of the API.
        Returns:
        A java.lang.Locale object describing the current locale of the API.
      • getNetworkTimeout

        public abstract int getNetworkTimeout()
                                       throws ServerConfigException
        Returns the network timeout, in seconds, which will be used for the getLocalNetworkServers call.
        Returns:
        The current network timeout, in seconds, used for the getLocalNetworkServers call.
        Throws:
        ServerConfigException - Thrown if an error occurs.
      • setNetworkTimeout

        public abstract void setNetworkTimeout​(int timeoutInSecs)
                                        throws ServerConfigException
        Sets the network timeout, in seconds, to use for the getLocalNetworkServers call.
        Parameters:
        timeoutInSecs - The timeout to use for the getLocalNetworkServers call, in seconds.
        Throws:
        ServerConfigException - Thrown if an error occurs.
      • SetNetworkClientReceiveTimeoutInMilliSeconds

        public abstract void SetNetworkClientReceiveTimeoutInMilliSeconds​(int timeout)
                                                                   throws ServerControlException
        Sets the network client receive timeout, in milliseconds, to use for the connect call.
        Parameters:
        timeout - The timeout to use for the connect call, in milliseconds.
        Throws:
        ServerConfigException - Thrown if an error occurs.
        ServerControlException
        Since:
        MicroStrategy Web 9.0.0
      • release

        public abstract void release()
        This method will release the underlying C++ API's memory structure. Calling this method is recommended when this object and all objects obtained from it are no longer being used. This method will clean up the C++ objects that this API communicates with. After calling this method, most methods on this interface or any objects obtained from this interface will fail. Also, note that it is not strictly necessary to call this method, as the C++ pointer will be cleaned up upon finalization as well.
      • refreshPerformanceLoggingSettings

        public abstract void refreshPerformanceLoggingSettings​(WebIServerSession session)
                                                        throws ServerConfigException,
                                                               WebObjectsException
        This method will attempt to refresh the performance logging settings on the server which the WebIServerSession is created on. This method will cause those settings to be re-read from the registry and applied to the server instance without restarting the server.
        Parameters:
        session - The session to use to refresh the performance logging settings.
        Throws:
        ServerConfigException - Thrown if the settings could not be refreshed.
        WebObjectsException - Thrown if there is a problem with the session passed in.
        Since:
        MicroStrategy Web 7.5.2
      • refreshDiagnosticsLoggingSettings

        public abstract void refreshDiagnosticsLoggingSettings​(WebIServerSession session)
                                                        throws ServerConfigException,
                                                               WebObjectsException
        This method will attempt to refresh the diagnostics logging settings on the server which the WebIServerSession is created on. This method will cause those settings to be re-read from the registry and applied to the server instance without restarting the server.
        Parameters:
        session - The session to use to refresh the performance logging settings.
        Throws:
        ServerConfigException - Thrown if the settings could not be refreshed.
        WebObjectsException - Thrown if there is a problem with the session passed in.
        Since:
        MicroStrategy Web 7.5.2
      • purgeServerStatistics

        public abstract void purgeServerStatistics​(WebIServerSession session,
                                                   java.util.Date fromDate,
                                                   java.util.Date toDate,
                                                   int timeout)
                                            throws ServerConfigException,
                                                   WebObjectsException
        This method will attempt to purge the statistics of a certain period collected on server.
        Parameters:
        session - WebIServerSession The session to user to purge the statistics.
        fromDate - Date The start date of the period to purge.
        toDate - Date The end date of the period to purge.
        timeout - int maximum time (in second) allowed for the purging process.
        Throws:
        ServerConfigException - Thrown if the purge failed.
        WebObjectsException - Thrown if there is a problem with the session passed in.
        Since:
        MicroStrategy Web 8.0.0
      • purgeServerStatistics

        public abstract void purgeServerStatistics​(WebIServerSession session,
                                                   java.util.Date fromDate,
                                                   java.util.Date toDate,
                                                   int timeout,
                                                   java.lang.String projectName)
                                            throws ServerConfigException,
                                                   WebObjectsException
        This method will attempt to purge the statistics of a certain period collected on server.
        Parameters:
        session - WebIServerSession The session to user to purge the statistics.
        fromDate - Date The start date of the period to purge.
        toDate - Date The end date of the period to purge.
        timeout - int maximum time (in second) allowed for the purging process.
        projectName - String The Project Name whose statistics will be purged.
        Throws:
        ServerConfigException - Thrown if the purge failed.
        WebObjectsException - Thrown if there is a problem with the session passed in.
        Since:
        MicroStrategy Web 9.0.0