Description
getAllSessions returns the detail information of active sessions with XML format, which are opened for the specific application in the specific Appeon Server.
Syntax
proxyobject.of_execinterface ( "getAllSessions", ref any paralist[] )
Table 9.
Argument |
Description |
---|---|
proxyobject |
The instance of the proxy object generated for AppeonDotNetComponent. |
paralist[] |
Arrays of Any type. Specifies the parameter arrays for the component function. paralist[1] - The name of the Appeon Server that the sessions are created in. The value should be IP address or IP address with port number, for example, 192.0.0.123, or 192.0.0.123:8080, and separated with semicolons (;) if there are multiple servers (for example in an Appeon Server cluster). If paralist[1] is NULL or an empty string (""), getAllSessions returns the information of all active sessions in an Appeon Server cluster (you will need to configure the cluster in AEM first). paralist[2] - The name of the application that is deployed to the Appeon Server. If paralist[2] is NULL or an empty string (""), getAllSessions returns the information of active sessions opened for all applications in the specified Appeon Server. paralist[3] - The return value of getAllSessions function: the session content in XML format. This parameter must be cleared, but need not to be assigned with values, as it is used to hold the return value. |
Return value of of_execinterface
Returns 1 if the of_execinterface function succeeds and one of the following negative values if an error occurs.
-1: function fails to execute
-2: the specified Appeon Server is not found
-3: the specified application is not found
Return value of getAllSessions
Returns an XML string. The XML string is stored in the paralist[3] parameter of the of_execinterface function.
The session content in the XML format will be like this.
<?xml version='1.0' encoding='utf-8'?> <sessions> <error> <code>0</code> <text></text> </error> <sever name='192.0.3.183' port='5000'> <session name='2079839564'> <client>192.0.1.223</client> <application-name>sales</application-name> <user>userA</user> <state>0</state> </session> <session name='1044430361'> <client>192.0.3.183</client> <application-name>acf</application-name> <user>user1</user> <state>0</state> </session> </sever> </sessions>
Method execution results are recorded in the error node.
Two parameters, code and text, are contained in the error node. The code parameter shows the execution result and the text parameter records the detail error information. If the execution result is not 0, only the error node is listed in the XML.
Values for the code parameter:
0: function succeeds in execution.
-1: function fails to execute.
-2: the specified Appeon Server is not found.
-3: the specified application is not found.
Code example
Any la_l[] Long lRet ... la_l[1] = ls_servername la_l[2] = ls_appname la_l[3] = ls_sessioncontent lRet = loadDBList.of_ExecInterface ("getAllSessions", la_l) //result is returned to la_l[3]
For Java:
io_ejb.regstring ( String serverName )
io_ejb.regstring ( String appName )
io_ejb.Invokeretstring ( long objid, "getAllSessions", true, ref string retval )
Table 10.
Argument |
Description |
---|---|
io_ejb |
A reference of Appeon EJBobject. |
serverName |
The name of the Appeon Server in which the active sessions are created. The value should be IP address or IP address with port number, for example, 192.0.0.123, or 192.0.0.123:8080, and separated with semicolons (;) if there are multiple servers (for example in an Appeon Server cluster). If serverName is NULL or an empty string (""), getAllSessions returns the information of active sessions opened for the specified application in all servers in an Appeon Server cluster (you will need to configure the cluster in AEM first). |
appName |
The name of the application that is deployed to the specified Appeon Server. If appName is NULL or empty string (""), getAllSessions returns the information of active sessions opened for all applications in the specified Appeon Server. |
objid |
The handle to the component method. |
retval |
The return value of getAllSessions function: the session content in XML format. This parameter must be cleared, but need not to be assigned with values, as it is used to hold the return value. |
Return value of Invokeretstring
Returns 1 if the Invokeretstring function succeeds and one of the following negative values if an error occurs.
-1: function fails to execute
-2: the specified Appeon Server is not found
-3: the specified application is not found
Return value of getAllSessions
Returns an XML string. The XML string is stored in the retval parameter of Invokeretstring function.
The session content in the XML format will be like this.
<?xml version='1.0' encoding='utf-8'?> <sessions> <error> <code>0</code> <text></text> </error> <sever name='192.0.3.183' port='5000'> <session name='2079839564'> <client>192.0.1.223</client> <application-name>sales</application-name> <user>userA</user> <state>0</state> </session> <session name='1044430361'> <client>192.0.3.183</client> <application-name>acf</application-name> <user>user1</user> <state>0</state> </session> </sever> </sessions>
Method execution results are recorded in the error node.
Two parameters, code and text, are contained in the error node. The code parameter shows the execution result and the text parameter records the detail error information. If the execution result is not 0, only the error node is listed in the XML.
Values for the code parameter:
0: function succeeds in execution.
-1: function fails to execute.
-2: the specified Appeon Server is not found.
-3: the specified application is not found.
Code example
Note that invokeretstring function is called because the return value is a string.
string ls_msg string retval01 ... io_ejb.regstring (ls_servername) io_ejb.regstring (ls_appname) ls_msg = io_ejb.invokeretstring (il_bean1, "getAllSessions", true, ref retval01) //result is returned to retval01
getAllSessions ( string serverName, string appName )
Table 11.
Argument |
Description |
---|---|
serverName |
The name of the Appeon Server in which the active sessions are created. The value should be IP address or IP address with port number, for example, 192.0.0.123, or 192.0.0.123:8080, and separated with semicolons (;) if there are multiple servers (for example in an Appeon Server cluster). If serverName is NULL or an empty string (""), getAllSessions returns the information of active sessions opened for the specified application in all servers in an Appeon Server cluster (you will need to configure the cluster in AEM first). |
appName |
The name of the application that is deployed to the specified Appeon Server. If appName is NULL or empty string (""), getAllSessions returns the information of active sessions opened for all applications in the specified Appeon Server. |
Return value
XML string. For example,
<?xml version='1.0' encoding='utf-8'?> <sessions> <error> <code>0</code> <text></text> </error> <sever name='192.0.3.183' port='5000'> <session name='2079839564'> <client>192.0.1.223</client> <application-name>sales</application-name> <user>userA</user> <state>0</state> </session> <session name='1044430361'> <client>192.0.3.183</client> <application-name>acf</application-name> <user>user1</user> <state>0</state> </session> </sever> </sessions>
Method execution results are recorded in the error node.
Two parameters, code and text, are contained in the error node. The code parameter shows the execution result and the text parameter records the detail error information. If the execution result is not 0, only the error node is listed in the XML.
Values for the code parameter:
0: function succeeds in execution.
-1: function fails to execute.
-2: the specified Appeon Server is not found.
-3: the specified application is not found.
Code example
//--connected to the web service …… string ls_return, ls_server, ls_app ls_server = sle_1.text ls_app = sle_2.text ls_return = ieon_ws.getAllSessions (ls_server, ls_app)