Package com.comsol.model.util
Class ModelUtilInternal
- java.lang.Object
-
- com.comsol.model.util.ModelUtilInternal
-
public class ModelUtilInternal extends java.lang.ObjectClient model utility methods which are not in the public API.
-
-
Field Summary
Fields Modifier and Type Field Description private static com.comsol.model.util.impl.IMphServerConnectionProviderserverConnectionProviderServer connection provider.
-
Constructor Summary
Constructors Modifier Constructor Description privateModelUtilInternal()Static class not intended to be instantiated.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcancelRunnable()Cancels the currently running command, if possible.static com.comsol.model.util.impl.IMphServerConnectionInternalconnect()Connects to a server.static com.comsol.model.util.impl.IMphServerConnectionInternalconnect(java.lang.String host, int port)Connects to a server using the specified host and port.static com.comsol.model.util.impl.IMphServerConnectionInternalconnect(java.lang.String host, int port, boolean encryption)Connects to a server using the specified host, port, and encryption.static com.comsol.model.util.impl.IMphServerConnectionInternalconnect(java.lang.String host, int port, boolean encryption, java.lang.String user, java.lang.String passWord)Connects to a server using the specified host, port, encryption, user, and password.static com.comsol.model.util.impl.IMphServerConnectionInternalconnect(java.lang.String host, int port, java.lang.String user, java.lang.String passWord)Connects to a server using the specified host, port, user, and password.static java.lang.BooleangetConnectedEncryption()Returns whether the currently connected server uses a secure connection or not, ornullif not connected.static java.lang.StringgetConnectedHost()Returns the host of the currently connected server, ornullif not connected.static java.lang.IntegergetConnectedPort()Returns the port of the currently connected server, ornullif not connected.private static com.comsol.model.util.impl.IMphServerConnectionProvidergetConnectionProvider()Returns the provider of server connections.static booleanisApplicationServer()Returns true if running in an application server.static booleanisGraphicsServer()Returns true if running in a graphics server.static java.lang.String[]path()Returns the search path.static voidpath(java.lang.String[] path)Sets the search path.static voidsetCosimCallbackHandler(CosimCallbackHandler cosimCallbackHandler)Register a handler for cosimulation callbacks, or null to unregister.static voidsetMethodExecImpl(com.comsol.model.util.impl.IModelUtilImpl modelUtilImpl)static voidstopRunnable(int stopLevel)Stops the currently running command at the given stop level, if possible.
-
-
-
Method Detail
-
getConnectionProvider
private static com.comsol.model.util.impl.IMphServerConnectionProvider getConnectionProvider()
Returns the provider of server connections.
-
connect
public static com.comsol.model.util.impl.IMphServerConnectionInternal connect()
Connects to a server.
-
connect
public static com.comsol.model.util.impl.IMphServerConnectionInternal connect(java.lang.String host, int port)Connects to a server using the specified host and port.
-
connect
public static com.comsol.model.util.impl.IMphServerConnectionInternal connect(java.lang.String host, int port, boolean encryption)Connects to a server using the specified host, port, and encryption.
-
connect
public static com.comsol.model.util.impl.IMphServerConnectionInternal connect(java.lang.String host, int port, java.lang.String user, java.lang.String passWord)Connects to a server using the specified host, port, user, and password.
-
connect
public static com.comsol.model.util.impl.IMphServerConnectionInternal connect(java.lang.String host, int port, boolean encryption, java.lang.String user, java.lang.String passWord)Connects to a server using the specified host, port, encryption, user, and password.
-
path
public static java.lang.String[] path()
Returns the search path. Note: This function is called from the test framework for model .m-tests.- Returns:
- Directories to search, ordered from first to last.
-
path
public static void path(java.lang.String[] path)
Sets the search path. Note: This function is called from the test framework for model .m-tests.- Parameters:
path- Directories to search, ordered from first to last.
-
getConnectedHost
public static java.lang.String getConnectedHost()
Returns the host of the currently connected server, ornullif not connected.- Returns:
- The connected server host computer, or
nullif not connected.
-
getConnectedPort
public static java.lang.Integer getConnectedPort()
Returns the port of the currently connected server, ornullif not connected.- Returns:
- The connected port, or
nullif not connected.
-
getConnectedEncryption
public static java.lang.Boolean getConnectedEncryption()
Returns whether the currently connected server uses a secure connection or not, ornullif not connected.- Returns:
Boolean.TRUEif the current connection is secure,Boolean.FALSEif it's not secure, ornullif not connected.
-
isGraphicsServer
public static boolean isGraphicsServer()
Returns true if running in a graphics server.
-
isApplicationServer
public static boolean isApplicationServer()
Returns true if running in an application server.
-
setCosimCallbackHandler
public static void setCosimCallbackHandler(CosimCallbackHandler cosimCallbackHandler)
Register a handler for cosimulation callbacks, or null to unregister.- Parameters:
cosimCallbackHandler- The handler for cosimulation callbacks.
-
cancelRunnable
public static void cancelRunnable()
Cancels the currently running command, if possible.
-
stopRunnable
public static void stopRunnable(int stopLevel)
Stops the currently running command at the given stop level, if possible.
-
setMethodExecImpl
public static void setMethodExecImpl(com.comsol.model.util.impl.IModelUtilImpl modelUtilImpl)
-
-