org.xins.server
Class CallContext

java.lang.Object
  extended byorg.xins.server.CallContext

public final class CallContext
extends Object

Context for a function call. Objects of this kind are passed with a function call.

Since:
XINS 1.0.0
Version:
$Revision: 1.117 $ $Date: 2006/08/28 09:12:33 $
Author:
Ernst de Haan

Method Summary
 int getCallID()
          Returns the assigned call ID.
 Element getDataElement()
          Returns the data section of the request, if any.
 String getParameter(String name)
          Returns the value of a parameter with the specificied name.
 String getRemoteAddr()
          Returns the IP address of the host that requested this function.
 long getStart()
          Returns the start time of the call.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getStart

public long getStart()
Returns the start time of the call.

Returns:
the timestamp indicating when the call was started, as a number of milliseconds since the UNIX Epoch.
See Also:
System.currentTimeMillis()

getParameter

public String getParameter(String name)
                    throws IllegalArgumentException
Returns the value of a parameter with the specificied name. Note that reserved parameters, i.e. those starting with an underscore ('_') cannot be retrieved.

Parameters:
name - the name of the parameter, not null.
Returns:
the value of the parameter, or null if the parameter is not set, never an empty string ("") because it will be returned as being null.
Throws:
IllegalArgumentException - if name == null.

getDataElement

public Element getDataElement()
Returns the data section of the request, if any.

Returns:
the element representing the data section or null if the function does not define a data section or if the data section sent is empty.

getCallID

public int getCallID()
Returns the assigned call ID. This ID is unique within the context of the pertaining function. If no call ID is assigned, then -1 is returned.

Returns:
the assigned call ID for the function, or -1 if none is assigned.

getRemoteAddr

public String getRemoteAddr()
Returns the IP address of the host that requested this function.

Returns:
the IP address as a String.


See http://www.xins.org/.