|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.lastbamboo.common.sip.proxy.SipRegistrarImpl
public class SipRegistrarImpl
Registrar for SIP clients. TODO: Also create a map of reader/writers to SIP URIs for more efficient removals??
| Constructor Summary | |
|---|---|
SipRegistrarImpl(org.lastbamboo.common.sip.stack.message.SipMessageFactory factory,
org.lastbamboo.common.sip.stack.transport.SipTcpTransportLayer transportLayer)
Creates a new registrar. |
|
| Method Summary | |
|---|---|
void |
addRegistrationListener(RegistrationListener listener)
Adds the specified listener for registration events. |
org.littleshoot.mina.common.IoSession |
getIoSession(URI uri)
Accesses the reader/writer for sending a message to the specified URI. |
Collection<URI> |
getRegistered()
Get registered URIs |
int |
getSipMaxRegistered()
Accessor for the maximum number of registrations we've seen. |
int |
getSipNumRegistered()
Accessor for the number of registered SIP clients. |
void |
handleRegister(org.lastbamboo.common.sip.stack.message.Register register,
org.littleshoot.mina.common.IoSession session)
Processes the specified register request. |
boolean |
hasRegistration(URI uri)
Determines whether or not we have a registration for the specified SIP URI. |
void |
sessionClosed(org.littleshoot.mina.common.IoSession session)
Called when an IO session has closed -- we have lost a connection to a client. |
String |
toString()
|
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
addNotificationListener, getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SipRegistrarImpl(org.lastbamboo.common.sip.stack.message.SipMessageFactory factory,
org.lastbamboo.common.sip.stack.transport.SipTcpTransportLayer transportLayer)
factory - The factory for creating messages for responding to
register requests.transportLayer - The transport layer for actually sending data.| Method Detail |
|---|
public void handleRegister(org.lastbamboo.common.sip.stack.message.Register register,
org.littleshoot.mina.common.IoSession session)
SipRegistrar
handleRegister in interface SipRegistrarregister - The register request to process.session - The class for writing message back to the client.public org.littleshoot.mina.common.IoSession getIoSession(URI uri)
SipRegistrar
getIoSession in interface SipRegistraruri - The URI to send a message to.
null
if we don't have information about the URI.public boolean hasRegistration(URI uri)
SipRegistrar
hasRegistration in interface SipRegistraruri - The SIP URI to check for a registration for.
true if we have a registration for the URI,
otherwise false.public void sessionClosed(org.littleshoot.mina.common.IoSession session)
SipRegistrar
sessionClosed in interface SipRegistrarsession - The closed session.public void addRegistrationListener(RegistrationListener listener)
SipRegistrar
addRegistrationListener in interface SipRegistrarlistener - The listener to add.public int getSipNumRegistered()
SipRegistrarImplMBean
getSipNumRegistered in interface SipRegistrarImplMBeanpublic int getSipMaxRegistered()
SipRegistrarImplMBean
getSipMaxRegistered in interface SipRegistrarImplMBeanpublic Collection<URI> getRegistered()
SipRegistrar
getRegistered in interface SipRegistrarpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||