org.cafesip.jiplet.sip
Class ProxyJiplet

java.lang.Object
  extended by org.cafesip.jiplet.Jiplet
      extended by org.cafesip.jiplet.sip.ProxyJiplet

public class ProxyJiplet
extends Jiplet

This jiplet class handles the SIP proxy functionality. One of the important functions of many server-side SIP applications is to proxy SIP request and response messages recieved from other SIP user agents. For routine proxy operations, instead of writing your own jiplet for proxy service, you can use this jiplet instead. This jiplet receives SIP request messages and proxies them to one or more locations. Similarly, it proxies response messages back to the originator of the request.

To use this jiplet, you will need to define a jiplet that uses this class in your jip.xml file and configure it to suit your needs. This is a jiplet class and therefore in the jip.xml file, you can use the same configuration elements as any other jiplet including mapping and security constraints.

You can configure how the jiplet works by specifying init params to the jiplet in the jip.xml file. The following init parameters are supported:


Constructor Summary
ProxyJiplet()
           
 
Method Summary
 void init(JipletConfig config)
          The init() method is called by the jiplet container when the jiplet is being initialized.
 void processRequest(JipletRequest requestEvent)
          This method is invoked by the container when a SIP request message is received that matches the selection criteria for the jiplet.
 void processResponse(JipletResponse responseEvent)
          This method is invoked by the container when a SIP response message is received.
 void processTimeout(JipletTimeout timeoutEvent)
          This method is invoked by the container when a SIP time-out event occurs.
 
Methods inherited from class org.cafesip.jiplet.Jiplet
cancelResponse, cancelTimer, debug, destroy, doAck, doBye, doCancel, doExtension, doInfo, doInvite, doMessage, doNotify, doOptions, doPrack, doRegister, doSubscribe, doUpdate, error, fatal, forward, getAddressFactory, getConnectorName, getConnectorProperty, getDescription, getDialog, getHeaderFactory, getInitParams, getJipletContext, getListeningPointDefault, getListeningPoints, getMessageFactory, getName, getSipProvider, getSipProvider, hasAddress, info, isDebugEnabled, processSignal, processTimer, registerForResponse, registerForResponse, setAddressFactory, setConnector, setDescription, setHeaderFactory, setInitParams, setJipletContext, setMessageFactory, setName, startTimer, startTimer, startTimer, startTimer, toString, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProxyJiplet

public ProxyJiplet()
Method Detail

init

public void init(JipletConfig config)
          throws JipletException
Description copied from class: Jiplet
The init() method is called by the jiplet container when the jiplet is being initialized. Jiplet classes extending this class must override this method in order to provide custom initialization logic.

Overrides:
init in class Jiplet
Parameters:
config - object containing the jiplet configuration. The jiplet configuration is specified in the file context.JIP-INF/jip.xml.
Throws:
JipletException

processRequest

public void processRequest(JipletRequest requestEvent)
Description copied from class: Jiplet
This method is invoked by the container when a SIP request message is received that matches the selection criteria for the jiplet. The selection criteria is specified in the descriptor file jip.xml. This method calls one of the do...() methods depending on the type of the request message. A jiplet class extending this class may override this method in order to provide the logic for handling SIP request messages. However, note that it may be more useful to override one or more of the do...() methods instead. If this method is overridden, the do..() methods do not get called.

Overrides:
processRequest in class Jiplet
Parameters:
requestEvent - the request object.

processResponse

public void processResponse(JipletResponse responseEvent)
Description copied from class: Jiplet
This method is invoked by the container when a SIP response message is received. The response message is always routed to the same jiplet that sent the request message. A jiplet extending this class may override this method in order to provide custom handling logic.

Overrides:
processResponse in class Jiplet
Parameters:
responseEvent - response object.

processTimeout

public void processTimeout(JipletTimeout timeoutEvent)
Description copied from class: Jiplet
This method is invoked by the container when a SIP time-out event occurs. A timeout event is reported by the SIP protocol stack when it is unable to send a message or when a response message is not received within a specified period of time. For more details, see the SIP specifications as well as the JAIN-SIP specificationa. A jiplet extending this class may override this method in order to provide custom handling logic.

Overrides:
processTimeout in class Jiplet
Parameters:
timeoutEvent - timeout object.


http://www.cafesip.org