|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecte4s.util.E4Object
e4s.html.E4Method
public class E4Method
Stands as placeholder for function within the application that are called via the CGI interface.
| Example_A.java |
A.A(e4s.html.E4Method),
E4CgiParams,
E4ModuleMethodStatistics,
E4MethodSilent,
E4ServletImplementation_Intf.PARAM_FUNCTION| Nested Class Summary | |
|---|---|
static class |
E4Method.E4MethodStatistics
Statistical information about E4Method calls. |
| Field Summary | |
|---|---|
static int |
SYSTEM_ALIAS
Adress room for e4s relevant defined (external accessible) aliases codes from , including, this value upwards. |
static int |
USERDEF_ALIAS
Adress room for user defined (external accessible) aliases codes from , including, this value upwards. |
| Fields inherited from class e4s.util.E4Object |
|---|
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET |
| Constructor Summary | |
|---|---|
E4Method()
When you create a E4Method, just set it to null. |
|
E4Method(boolean requires_session)
Create a E4Method object for later reference. |
|
E4Method(E4Method mref)
|
|
E4Method(int external_alias,
java.lang.String description)
In some cases, you might need a E4Method that can be referenced from outside (e.g. a Web-Page, a menu that comes out of a database). |
|
E4Method(int external_alias,
java.lang.String description,
boolean requires_session)
In some cases, you might need a E4Method that can be referenced from outside (e.g. a Web-Page, a menu that comes out of a database). |
|
E4Method(java.lang.reflect.Method method,
int aliasUserDef,
java.lang.String description,
boolean has_class_HTML_as_parameter,
boolean has_class_E4CgiParams_as_parameter,
boolean requires_session)
Do not use this constructor, it is intended to be used by the E4S framework internally, to declare all E4Methods and set their apropriate objects. |
|
| Method Summary | |
|---|---|
static java.lang.String |
_getSVNVersionString()
Get version info string from subversion. |
java.lang.String |
constructUrl(E4ServletImplementation_Intf servlet)
Construct a URL in the form: E4ServletImplementation_Intf.getUrl() + "?" |
java.lang.String |
constructUrl(E4ServletImplementation_Intf servlet,
boolean 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() + "?" |
static java.lang.String |
constructUrl(E4ServletImplementation_Intf servlet,
int alias)
|
static java.lang.String |
constructUrl(E4ServletImplementation_Intf servlet,
int alias,
boolean timestamp)
|
static java.lang.String |
constructUrl(E4ServletImplementation_Intf servlet,
int alias,
E4CgiParams params,
boolean timestamp)
|
static void |
dumpStatistics(boolean force)
|
static E4Method_Intf |
findMethod(int alias)
Find the E4Method that is associated with a particular alias. |
static int |
findUserDef(int internal_alias)
Find a user defined alias to an internal ("real") alias identification. |
static void |
forceAlias(E4Method mref,
int alias)
Internal use only |
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()
|
long |
getCallCounter(int hour)
|
java.lang.Class |
getDeclaringClass()
Get the declaring class for this E4Method object. |
java.lang.String |
getDescription()
|
static java.lang.String |
getE4MethodName(int alias)
Look for a E4Method in the list of registered method, and get the name for it. |
int |
getExternalAlias()
|
java.util.Date |
getFirstCall()
Get the last call this function was called |
long |
getFirstCallLng()
|
static int |
getHighestAlias()
Find the highest internally alias number. |
java.util.Date |
getLastCall()
Get the last call this function was called |
long |
getLastCallLng()
|
java.lang.reflect.Method |
getMethod()
The method invoved. |
java.lang.String |
getMethodName()
Get the full qualified name (package.module.function) for that E4Method |
E4Method.E4MethodStatistics |
getStats()
|
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. |
static int[] |
getUserDefinitions()
|
static java.util.Enumeration |
getVector()
|
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()
Check, if a E4Method is silent. |
boolean |
requiresSession()
Does this E4Method requires a Session? |
void |
resetStatistics()
|
java.lang.String |
toString()
|
void |
updateStatistics(long duration_application,
long duration_e4s_output,
long buffer_size)
Increment the call counter by 1 and store statistical values. |
| Methods inherited from class e4s.util.E4Object |
|---|
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int USERDEF_ALIAS
public static int SYSTEM_ALIAS
USERDEF_ALIAS.
USERDEF_ALIAS| Constructor Detail |
|---|
public E4Method()
public class MyClass extends E4ModuleImplementation
{
public E4Method functionOne = null;
public E4Method functionTwo = null;
public MyClass(E4ServletImplementation_Intf servlet)
{
super(servlet);
}
public functionOne( HTML html, E4CgiParams params )
{
}
public functionTwo( HTML html, E4CgiParams params )
{
}
}
public E4Method(E4Method mref)
public E4Method(int external_alias,
java.lang.String description)
USERDEF_ALIAS
to have room for the automaticaly incremental alias coding schema below
and some features to be built in the next release which needs codes above.
alias - the alias codedescription - the description of the function - when it shall be listed for default startup, may be null.
#see #USERDEF_ALIAS
public E4Method(int external_alias,
java.lang.String description,
boolean requires_session)
USERDEF_ALIAS
to have room for the automaticaly incremental alias coding schema below
and some features to be built in the next release which needs codes above.
alias - the alias codedescription - the description of the function - when it shall be listed for default startup, may be null.requires_session - true: a session (login) is required
#see #USERDEF_ALIASpublic E4Method(boolean requires_session)
requires_session - true: a session (login) is required
public E4Method(java.lang.reflect.Method method,
int aliasUserDef,
java.lang.String description,
boolean has_class_HTML_as_parameter,
boolean has_class_E4CgiParams_as_parameter,
boolean requires_session)
E4Method()| Method Detail |
|---|
public static java.util.Enumeration getVector()
public java.lang.reflect.Method getMethod()
E4Method_Intf
getMethod in interface E4Method_Intfpublic boolean is_HTML_a_parameter()
E4Method_IntfHTML is used as first parameter.
is_HTML_a_parameter in interface E4Method_IntfHTML is used as first parameter. false if notpublic boolean is_E4CgiParams_a_parameter()
E4Method_IntfE4CgiParams is used as second parameter. This requires
HTML as first parameter.
is_E4CgiParams_a_parameter in interface E4Method_IntfHTML is used as first parameter. false if notpublic static java.lang.String getE4MethodName(int alias)
alias - the ID for the method reflection.
#findE4Methodpublic java.lang.Class getDeclaringClass()
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)).
getDeclaringClass in interface E4Method_Intfpublic static E4Method_Intf findMethod(int alias)
E4CgiParams names E4ServletImplementation_Intf.PARAM_FUNCTION.
Even if E4Methods are not beeing initialized, E4S will renumber them and give them an internal
index (called the "Alias") which by now identifies each E4Method unique and is a placeholder
for the Java function associated with. When running the application, you can query a list of the
E4Methods along with their alias codes.
alias2 - a valid internal alias code (typically this number starts at 0)getAlias(),
E4ServletImplementation_Intf.PARAM_FUNCTIONpublic int getAlias()
E4Method_IntfE4ServletImplementation_Intf.PARAM_FUNCTION
parameter.
getAlias in interface E4Method_IntfE4ServletImplementation_Intf.PARAM_FUNCTION,
A.getAlias()
public static void forceAlias(E4Method mref,
int alias)
public java.lang.String getDescription()
public static int getHighestAlias()
public static int findUserDef(int internal_alias)
public int getExternalAlias()
public java.lang.String toString()
toString in class E4Object
public void updateStatistics(long duration_application,
long duration_e4s_output,
long buffer_size)
updateStatistics in interface E4Method_Intfduration_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 clientpublic void resetStatistics()
resetStatistics in interface E4Method_Intfpublic E4Method.E4MethodStatistics getStats()
public long getCallCounter()
getCallCounter in interface E4Method_Intfpublic long getCallCounter(int hour)
public long getAvgBufferSize()
getAvgBufferSize in interface E4Method_Intfpublic long getSumBufferSize()
E4Method_Intf
getSumBufferSize in interface E4Method_Intfpublic long getAvgDurationApp()
E4Method_Intf
getAvgDurationApp in interface E4Method_Intfpublic long getAvgDurationE4S()
E4Method_Intf
getAvgDurationE4S in interface E4Method_Intfpublic long getAvgDuration()
E4Method_Intf
getAvgDuration in interface E4Method_Intfpublic long getSumDurationApp()
E4Method_Intf
getSumDurationApp in interface E4Method_Intfpublic long getSumDurationE4S()
E4Method_Intf
getSumDurationE4S in interface E4Method_Intfpublic long getSumDuration()
E4Method_Intf
getSumDuration in interface E4Method_Intfpublic java.util.Date getLastCall()
getLastCall in interface E4Method_Intfpublic long getLastCallLng()
getLastCallLng in interface E4Method_Intfpublic java.util.Date getFirstCall()
getFirstCall in interface E4Method_Intfpublic long getFirstCallLng()
getFirstCallLng in interface E4Method_Intfpublic java.lang.String constructUrl(E4ServletImplementation_Intf servlet)
E4Method_IntfE4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + E4Method_Intf.getAlias()
constructUrl in interface E4Method_Intfservlet - the servlet context
public java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
E4CgiParams params)
E4Method_IntfE4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + E4Method_Intf.getAlias()
constructUrl in interface E4Method_Intfservlet - the servlet contextparams - optional additional parameters (if not null)
public java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
boolean timestamp)
E4Method_IntfE4ServletImplementation_Intf.getUrl() + "?" + E4ServletImplementation_Intf.PARAM_FUNCTION + "=" + E4Method_Intf.getAlias()
constructUrl in interface E4Method_Intfservlet - the servlet contexttimestamp - if true, a variable TIM=... is appended to make each URL unique
public static java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
int alias)
public static java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
int alias,
boolean timestamp)
public static java.lang.String constructUrl(E4ServletImplementation_Intf servlet,
int alias,
E4CgiParams params,
boolean timestamp)
public boolean isSilent()
isSilent in interface E4Method_Intfpublic static int[] getUserDefinitions()
public boolean requiresSession()
requiresSession in interface E4Method_IntfE4ServletImplementation_Intf.getSession(),
E4Method( int, String, boolean )public java.lang.String getMethodName()
public static void dumpStatistics(boolean force)
public static java.lang.String _getSVNVersionString()
E4Util.getRevisionCodeFromSVN(Class)
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||