org.cafesip.jiplet.sip
Interface Location


public interface Location

This interface is used to specify how the ProxyJiplet interacts with the location database. The ProxyJiplet provides proxy functionality to the jiplet applications. For standard proxy operations, you can choose to write use the ProxyJiplet instead of writing your own. When a SIP request message is received, the jiplet needs access to a location database where all registered users' location is stored in order to route the message to appropriate locations. You can create a class that implement this interface in order to provide the necessary access to the location database. As an init param to the jiplet, you specify this location database access class. When a request message arrives, the jiplet calls the getLocation() method to obtain the location information.


Method Summary
 java.util.ArrayList getLocation(javax.sip.address.URI address)
          This method is called by the jiplet to look up an user's location.
 void init(java.lang.String param)
          This method is called by the ProxyJiplet when the class implementing this interface is instantiated.
 void setAddressFactory(javax.sip.address.AddressFactory address)
          This method is used by the ProxyJiplet to set the JAIN-SIP address factory.
 void setHeaderFactory(javax.sip.header.HeaderFactory header)
          This method is used by the ProxyJiplet to set the JAIN-SIP header factory.
 void setMessageFactory(javax.sip.message.MessageFactory message)
          This method is used by the ProxyJiplet to set the JAIN-SIP message factory.
 

Method Detail

init

void init(java.lang.String param)
          throws JipletException
This method is called by the ProxyJiplet when the class implementing this interface is instantiated. This will give this object an opportunity to initialize access to the database. If the initialization fails for any reason, this method can signal the failure by throwing a JipletException.

Parameters:
param - the param specified in the init-param of the ProxyJiplet with name locationRegisterParam.
Throws:
JipletException

getLocation

java.util.ArrayList getLocation(javax.sip.address.URI address)
This method is called by the jiplet to look up an user's location.

Parameters:
address - The URI of the TO header that is received in the SIP message.
Returns:
An ArrayList of javax.sip.address.URI elements. Each element specifies a location. If this list is empty, the proxy jiplet sends a TEMPORARILY_UNAVAILABLE response.

setAddressFactory

void setAddressFactory(javax.sip.address.AddressFactory address)
This method is used by the ProxyJiplet to set the JAIN-SIP address factory.

Parameters:
address -

setHeaderFactory

void setHeaderFactory(javax.sip.header.HeaderFactory header)
This method is used by the ProxyJiplet to set the JAIN-SIP header factory.

Parameters:
header -

setMessageFactory

void setMessageFactory(javax.sip.message.MessageFactory message)
This method is used by the ProxyJiplet to set the JAIN-SIP message factory.

Parameters:
message -


http://www.cafesip.org