public class LocationService
extends java.lang.Object
Registrar example you saw how we created an association with a AOR
(address-of-record) and a particular Contact address. We simply stored this in the same scope as
the registrar handler itself but overall there wasn't much use to that example since you could
only register and nothing else. Typically, you have a location store, where the registrar manages
the bindings and someone else, such as a location aware proxy, reads those bindings and does
something useful with it.
This is the location service where we will store the associations between an AOR and the contact
addresses where we can reach the AOR. This is a very simple in-memory location store and normally
you would either use some kind of distributed storage, such as redis, hazelcast etc or perhaps a
plain DB (you should ask yourself why you really need a DB though)| Modifier and Type | Method and Description |
|---|---|
java.util.List<Binding> |
getBindings(io.pkts.packet.sip.address.SipURI aor) |
static LocationService |
getInstance() |
java.util.List<Binding> |
updateBindings(Binding binding) |
public static LocationService getInstance()
public java.util.List<Binding> getBindings(io.pkts.packet.sip.address.SipURI aor)
Copyright © 2015. All Rights Reserved.