Package matlabcontrol.extensions
Class MatlabProxyLogger
- java.lang.Object
-
- matlabcontrol.extensions.MatlabProxyLogger
-
public class MatlabProxyLogger extends java.lang.ObjectDeprecated.Replaced byLoggingMatlabProxy. Wraps around aMatlabProxyto provide a log of interactions. The data is not altered. This logger is useful for determining the Java types and structure of data returned from MATLAB.
Entering a method, exiting a method, and throwing an exception are logged. Method parameters and return values are logged. The contents of a returned array will be recursively explored and its contents logged. As is convention, all of these interactions are logged atLevel.FINER. If the logging system has not been otherwise configured, then theConsoleHandlerwhich prints log messages to the console will not show these log messages as their level is too low. To configure theConsoleHandlerto show these log messages, callshowInConsoleHandler().
This class is unconditionally thread-safe.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description MatlabProxyLogger(MatlabProxy proxy)Deprecated.Constructs the logger.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddDisconnectionListener(MatlabProxy.DisconnectionListener listener)Deprecated.Delegates to the proxy; logs the interaction.booleandisconnect()Deprecated.Delegates to the proxy; logs the interaction.voideval(java.lang.String command)Deprecated.Delegates to the proxy; logs the interaction.voidexit()Deprecated.Delegates to the proxy; logs the interaction.voidfeval(java.lang.String functionName, java.lang.Object... args)Deprecated.Delegates to the proxy; logs the interaction.MatlabProxy.IdentifiergetIdentifier()Deprecated.Delegates to the proxy; logs the interaction.java.lang.ObjectgetVariable(java.lang.String variableName)Deprecated.Delegates to the proxy; logs the interaction.<U> UinvokeAndWait(MatlabProxy.MatlabThreadCallable<U> callable)Deprecated.Delegates to the proxy; logs the interaction.booleanisConnected()Deprecated.Delegates to the proxy; logs the interaction.booleanisExistingSession()Deprecated.Delegates to the proxy; logs the interaction.booleanisRunningInsideMatlab()Deprecated.Delegates to the proxy; logs the interaction.voidremoveDisconnectionListener(MatlabProxy.DisconnectionListener listener)Deprecated.Delegates to the proxy; logs the interaction.java.lang.Object[]returningEval(java.lang.String command, int nargout)Deprecated.Delegates to the proxy; logs the interaction.java.lang.Object[]returningFeval(java.lang.String functionName, int nargout, java.lang.Object... args)Deprecated.Delegates to the proxy; logs the interaction.voidsetVariable(java.lang.String variableName, java.lang.Object value)Deprecated.Delegates to the proxy; logs the interaction.static voidshowInConsoleHandler()Deprecated.Configures theConsoleHandlerresponsible for showing logging records to show the records that are logged by this interactor.java.lang.StringtoString()Deprecated.Returns a brief description of this proxy.
-
-
-
Constructor Detail
-
MatlabProxyLogger
public MatlabProxyLogger(MatlabProxy proxy)
Deprecated.Constructs the logger. If the providedproxythrows an exception it will be caught, logged, and then rethrown.- Parameters:
proxy-
-
-
Method Detail
-
showInConsoleHandler
public static void showInConsoleHandler()
Deprecated.Configures theConsoleHandlerresponsible for showing logging records to show the records that are logged by this interactor. This is behavior is useful if you have not otherwise configured logging in your application.
-
eval
public void eval(java.lang.String command) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
command-- Throws:
MatlabInvocationException
-
returningEval
public java.lang.Object[] returningEval(java.lang.String command, int nargout) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
command-nargout-- Returns:
- Throws:
MatlabInvocationExceptioMatlabInvocationException
-
feval
public void feval(java.lang.String functionName, java.lang.Object... args) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
functionName-args-- Throws:
MatlabInvocationException
-
returningFeval
public java.lang.Object[] returningFeval(java.lang.String functionName, int nargout, java.lang.Object... args) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
functionName-nargout-args-- Returns:
- Throws:
MatlabInvocationException
-
setVariable
public void setVariable(java.lang.String variableName, java.lang.Object value) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
variableName-value-- Throws:
MatlabInvocationException
-
getVariable
public java.lang.Object getVariable(java.lang.String variableName) throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Parameters:
variableName-- Returns:
- Throws:
MatlabInvocationException
-
invokeAndWait
public <U> U invokeAndWait(MatlabProxy.MatlabThreadCallable<U> callable) throws MatlabInvocationException
Deprecated.Delegates to the proxy; logs the interaction.- Type Parameters:
U-- Parameters:
callable-- Returns:
- Throws:
MatlabInvocationException
-
addDisconnectionListener
public void addDisconnectionListener(MatlabProxy.DisconnectionListener listener)
Deprecated.Delegates to the proxy; logs the interaction.- Parameters:
listener-
-
removeDisconnectionListener
public void removeDisconnectionListener(MatlabProxy.DisconnectionListener listener)
Deprecated.Delegates to the proxy; logs the interaction.- Parameters:
listener-
-
disconnect
public boolean disconnect()
Deprecated.Delegates to the proxy; logs the interaction.- Returns:
-
isExistingSession
public boolean isExistingSession()
Deprecated.Delegates to the proxy; logs the interaction.- Returns:
-
isRunningInsideMatlab
public boolean isRunningInsideMatlab()
Deprecated.Delegates to the proxy; logs the interaction.- Returns:
-
isConnected
public boolean isConnected()
Deprecated.Delegates to the proxy; logs the interaction.- Returns:
-
getIdentifier
public MatlabProxy.Identifier getIdentifier()
Deprecated.Delegates to the proxy; logs the interaction.- Returns:
-
exit
public void exit() throws MatlabInvocationExceptionDeprecated.Delegates to the proxy; logs the interaction.- Throws:
MatlabInvocationException
-
toString
public java.lang.String toString()
Deprecated.Returns a brief description of this proxy. The exact details of this representation are unspecified and are subject to change.- Overrides:
toStringin classjava.lang.Object- Returns:
-
-