com.sdm.quasar.client.core.server.impl.plugins
Class LogTimingServerProxyPlugin

java.lang.Object
  extended bycom.sdm.quasar.client.core.server.impl.plugins.LogTimingServerProxyPlugin
All Implemented Interfaces:
ServerProxyPlugin

public class LogTimingServerProxyPlugin
extends java.lang.Object
implements ServerProxyPlugin

A ServerProxyPlugin logging configurable messages at start and finish of a server service call.

Version:
1.$Revision$
Author:
Thomas Wolf

Nested Class Summary
 
Nested classes inherited from class com.sdm.quasar.client.core.server.impl.ServerProxyPlugin
ServerProxyPlugin.ServerProxyPluginCallback
 
Constructor Summary
LogTimingServerProxyPlugin(int logSeverity, java.lang.String logMessageStart, java.lang.String logMessageFinish, java.lang.String logMessageError)
          Creates a new LogTimingServerProxyPlugin.
 
Method Summary
 java.lang.String getLogMessageError()
          Returns the String.
 java.lang.String getLogMessageFinish()
          Returns the logging message pattern used at the end of a server service call.
 java.lang.String getLogMessageStart()
          Returns the logging message pattern used at the start of a server service call.
 int getLogSeverity()
          Returns the int.
 boolean hasServerService(java.lang.Class service, ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
          Tests, whether a service is registered with the service manager.
 java.lang.Object processServerServiceCall(java.lang.Class serverInterface, java.lang.reflect.Method method, java.lang.Object[] args, ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogTimingServerProxyPlugin

public LogTimingServerProxyPlugin(int logSeverity,
                                  java.lang.String logMessageStart,
                                  java.lang.String logMessageFinish,
                                  java.lang.String logMessageError)
Creates a new LogTimingServerProxyPlugin.

Method Detail

getLogSeverity

public int getLogSeverity()
Returns the int.


getLogMessageStart

public java.lang.String getLogMessageStart()
Returns the logging message pattern used at the start of a server service call. The following arguments can be used in the message pattern:
Message parameters
Nr. Type Description
0 String The name of the interface called.
1 String The name of the method called.
2 String The arguments of the method call (limited to 1000 characters).
3 Date The start time of calling the server service.


getLogMessageFinish

public java.lang.String getLogMessageFinish()
Returns the logging message pattern used at the end of a server service call. The following arguments can be used in the message pattern:
Message parameters
Nr. Type Description
0 String The name of the interface called.
1 String The name of the method called.
2 String The arguments of the method call (limited to 1000 characters).
3 String The result of the method call (limited to 1000 characters).
4 Date The start time of calling the server service.
5 Long The duration of the server call (in milliseconds).


getLogMessageError

public java.lang.String getLogMessageError()
Returns the String.


hasServerService

public boolean hasServerService(java.lang.Class service,
                                ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
Description copied from interface: ServerProxyPlugin
Tests, whether a service is registered with the service manager.

Specified by:
hasServerService in interface ServerProxyPlugin
Parameters:
service - the interface that defines the service
Returns:
true, iff an implementation is registered for the given service.
See Also:
ServerProxyPlugin.hasServerService(java.lang.Class, com.sdm.quasar.client.core.server.impl.ServerProxyPlugin.ServerProxyPluginCallback)

processServerServiceCall

public java.lang.Object processServerServiceCall(java.lang.Class serverInterface,
                                                 java.lang.reflect.Method method,
                                                 java.lang.Object[] args,
                                                 ServerProxyPlugin.ServerProxyPluginCallback serverProxyPluginCallback)
                                          throws java.lang.Throwable
Specified by:
processServerServiceCall in interface ServerProxyPlugin
Parameters:
serverInterface -
method -
args -
serverProxyPluginCallback - a ServerProxyPlugin.ServerProxyPluginCallback to access the subsequent ServerProxyPlugins without knowing them
Returns:
Throws:
java.lang.Throwable
See Also:
ServerProxyPlugin.processServerServiceCall(java.lang.Class, java.lang.reflect.Method, java.lang.Object[], com.sdm.quasar.client.core.server.impl.ServerProxyPlugin.ServerProxyPluginCallback)