org.cafesip.jiplet
Class JipletRequest

java.lang.Object
  extended by org.cafesip.jiplet.ScopedVariables
      extended by org.cafesip.jiplet.JipletEvent
          extended by org.cafesip.jiplet.JipletRequest

public class JipletRequest
extends JipletEvent

This class conatins methods that is used by a jiplet to retrieve information about a request event. When a SIP request message is received, the container passes on the request event to the jiplets matching the specified selection criteria. The callback method Jiplet.processRequest() is called by the container. This object is passed as a parameter.


Constructor Summary
protected JipletRequest()
          A constructor for this class.
 
Method Summary
 Jiplet getJiplet()
           
 javax.sip.RequestEvent getRequestEvent()
           
 JipletSession getSession(boolean create)
          Get the session object associated with this request.
 SipCommunicator getSipCommunicator()
          This method returns a SIP communicator object which can be used to proxy SIP requests, responses, handle proxy timeouts as well as other SIP-related operations.
 java.security.Principal getUserPrincipal()
           
 boolean isUserInRole(java.lang.String role)
          Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
protected  void setJiplet(Jiplet jiplet)
           
protected  void setRequestEvent(javax.sip.RequestEvent requestEvent)
           
protected  void setRoles(java.lang.String[] roles)
           
protected  void setUserPrincipal(java.security.Principal userPrincipal)
           
 
Methods inherited from class org.cafesip.jiplet.JipletEvent
getForward, getJipletContext, getSession, setForward, setJipletContext
 
Methods inherited from class org.cafesip.jiplet.ScopedVariables
getAttribute, getAttributeNames, removeAttribute, setAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JipletRequest

protected JipletRequest()
A constructor for this class.

Method Detail

getRequestEvent

public javax.sip.RequestEvent getRequestEvent()
Returns:
Returns the requestEvent. The RequestEvent is a JAIN-SIP object that contains the event information including the parsed request message.

setRequestEvent

protected void setRequestEvent(javax.sip.RequestEvent requestEvent)
Parameters:
requestEvent - The requestEvent to set.

getSession

public JipletSession getSession(boolean create)
Get the session object associated with this request. A session identifies the SIP endpoint (UAC). Session-scope variables are supported similar to servlets and this object is used for storing session-scope variables.

Parameters:
create - create the session object if it does not exist.
Returns:
the session object. Null if the create parameter is false and the session object does not exist.

getUserPrincipal

public java.security.Principal getUserPrincipal()
Returns:
Returns the userPrincipal. A null is returned if the user has not been authenticated.

setUserPrincipal

protected void setUserPrincipal(java.security.Principal userPrincipal)
Parameters:
userPrincipal - The userPrincipal to set.

isUserInRole

public boolean isUserInRole(java.lang.String role)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role". Roles and role membership can be defined using deployment descriptors. If the user has not been authenticated, the method returns false.

Parameters:
role - a String specifying the name of the role
Returns:
a boolean indicating whether the user making this request belongs to a given role; false if the user has not been authenticated

setRoles

protected void setRoles(java.lang.String[] roles)
Parameters:
roles - The roles to set.

getJiplet

public Jiplet getJiplet()
Returns:
Returns the jiplet.

setJiplet

protected void setJiplet(Jiplet jiplet)
Parameters:
jiplet - The jiplet to set.

getSipCommunicator

public SipCommunicator getSipCommunicator()
This method returns a SIP communicator object which can be used to proxy SIP requests, responses, handle proxy timeouts as well as other SIP-related operations.

Returns:


http://www.cafesip.org