www.element4solution.com

e4s.html
Interface E4Method_Intf

All Known Implementing Classes:
E4Method, E4MethodPickup, E4MethodSilent

public interface E4Method_Intf

Interface for the E4Method, which is the basic injection mechanism in E4S.


Method Summary
 java.lang.String constructUrl(E4ServletImplementation_Intf servlet)
          Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?"
 java.lang.String constructUrl(E4ServletImplementation_Intf servlet, boolean include_timestamp)
          Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?"
 java.lang.String constructUrl(E4ServletImplementation_Intf servlet, E4CgiParams params)
          Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?"
 int getAlias()
          Return the alias code of the function.
 long getAvgBufferSize()
           
 long getAvgDuration()
          Get the average duration in ms.
 long getAvgDurationApp()
          Get the average duration (application only) in ms.
 long getAvgDurationE4S()
          Get the average duration (E4S only) in ms.
 long getCallCounter()
           
 java.lang.Class getDeclaringClass()
          Get the declaring class for this E4Method object.
 java.util.Date getFirstCall()
           
 long getFirstCallLng()
           
 java.util.Date getLastCall()
          Get the last call this function was called.
 long getLastCallLng()
           
 java.lang.reflect.Method getMethod()
          The method invoved.
 long getSumBufferSize()
          Get the size of the HTML output buffer sent to the client.
 long getSumDuration()
          Get the total duration in ms over all calls since the servlet was started.
 long getSumDurationApp()
          Get the total duration (application only) in ms over all calls since the servlet was started.
 long getSumDurationE4S()
          Get the total duration (E4S output only) in ms over all calls since the servlet was started.
 boolean is_E4CgiParams_a_parameter()
          Defines, if E4CgiParams is used as second parameter.
 boolean is_HTML_a_parameter()
          Defines, if HTML is used as first parameter.
 boolean isSilent()
           
 boolean requiresSession()
           
 void resetStatistics()
           
 void updateStatistics(long duration_application, long duration_e4s_output, long buffer_size)
          Increment the call counter by 1 and store statistical values.
 

Method Detail

getAlias

int getAlias()
Return the alias code of the function. The alias is a placeholder, that is defined by the E4ServletImplementation_Intf.PARAM_FUNCTION parameter.

See Also:
E4ServletImplementation_Intf.PARAM_FUNCTION, A.getAlias()

is_HTML_a_parameter

boolean is_HTML_a_parameter()
Defines, if HTML is used as first parameter.

Returns:
true, if HTML is used as first parameter. false if not

is_E4CgiParams_a_parameter

boolean is_E4CgiParams_a_parameter()
Defines, if E4CgiParams is used as second parameter. This requires HTML as first parameter.

Returns:
true, if HTML is used as first parameter. false if not

getMethod

java.lang.reflect.Method getMethod()
The method invoved.

Returns:
a Method used in your application as some kind of a "callback" function.

getCallCounter

long getCallCounter()
Returns:
the call counter (how often this method was called after starting up the servlet)

updateStatistics

void updateStatistics(long duration_application,
                      long duration_e4s_output,
                      long buffer_size)
Increment the call counter by 1 and store statistical values.

Parameters:
duration_application - time in ms that has been took by the business logic application (application dependent)
duration_e4s_output - time in ms that has been took to handle the HTML elements in their output (e4s dependent)
buffer_size - char's written out to the client

resetStatistics

void resetStatistics()

getLastCall

java.util.Date getLastCall()
Get the last call this function was called.

Returns:
the last date/time

getFirstCall

java.util.Date getFirstCall()

getLastCallLng

long getLastCallLng()

getFirstCallLng

long getFirstCallLng()

getAvgDuration

long getAvgDuration()
Get the average duration in ms. Considers all calls since the servlet was started.

Returns:
-1 if no statistics is available or the avarage time in ms

getAvgDurationApp

long getAvgDurationApp()
Get the average duration (application only) in ms. Considers all calls since the servlet was started.

Returns:
-1 if no statistics is available or the avarage time in ms

getAvgDurationE4S

long getAvgDurationE4S()
Get the average duration (E4S only) in ms. Considers all calls since the servlet was started.

Returns:
-1 if no statistics is available or the avarage time in ms

getSumDuration

long getSumDuration()
Get the total duration in ms over all calls since the servlet was started.

Returns:
-1 if no statistics is available or the total time in ms

getSumDurationE4S

long getSumDurationE4S()
Get the total duration (E4S output only) in ms over all calls since the servlet was started.

Returns:
-1 if no statistics is available or the total time in ms

getSumDurationApp

long getSumDurationApp()
Get the total duration (application only) in ms over all calls since the servlet was started.

Returns:
-1 if no statistics is available or the total time in ms

getSumBufferSize

long getSumBufferSize()
Get the size of the HTML output buffer sent to the client.


getAvgBufferSize

long getAvgBufferSize()

constructUrl

java.lang.String constructUrl(E4ServletImplementation_Intf servlet)
Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + getAlias()

Parameters:
servlet - the servlet context
Returns:
a String representing a Url including the alias code.

constructUrl

java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
                              E4CgiParams params)
Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + getAlias()

Parameters:
servlet - the servlet context
params - optional additional parameters (if not null)
Returns:
a String representing a Url including the alias code.

constructUrl

java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
                              boolean include_timestamp)
Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + getAlias()

Parameters:
servlet - the servlet context
include_timestamp - if true, a variable TIM=... is appended to make each URL unique
Returns:
a String representing a Url including the alias code.

isSilent

boolean isSilent()

getDeclaringClass

java.lang.Class getDeclaringClass()
Get the declaring class for this E4Method object. This is almost used as initial E4ID for application modules initializing the first HTMLobject by the framework (done in E4ServletImplementation.invoceFunctionHTML(e4s.html.E4Method_Intf, e4s.html.E4CgiParams, e4s.servlet.E4ServletImplementation_Intf)).

Returns:
null if method reflection has not been initialized so far or the declaring class.

requiresSession

boolean requiresSession()

www.element4solution.com