org.mobicents.servlet.sip.startup
Class SipProtocolHandler
java.lang.Object
org.mobicents.servlet.sip.startup.SipProtocolHandler
- All Implemented Interfaces:
- javax.management.MBeanRegistration, org.apache.coyote.ProtocolHandler
public class SipProtocolHandler
- extends java.lang.Object
- implements org.apache.coyote.ProtocolHandler, javax.management.MBeanRegistration
This is the sip protocol handler that will get called upon creation of the
tomcat connector defined in the server.xml.
To use a sip connector, one
need to specify a new connector in server.xml with
org.mobicents.servlet.sip.startup.SipProtocolHandler as the value for the
protocol attribute.
Some of the fields (representing the sip stack propeties) get populated
automatically by the container.
- Author:
- Jean Deruelle
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tpOname
protected javax.management.ObjectName tpOname
rgOname
protected javax.management.ObjectName rgOname
extendedListeningPoint
public ExtendedListeningPoint extendedListeningPoint
domain
protected java.lang.String domain
oname
protected javax.management.ObjectName oname
mserver
protected javax.management.MBeanServer mserver
SipProtocolHandler
public SipProtocolHandler()
destroy
public void destroy()
throws java.lang.Exception
-
- Specified by:
destroy in interface org.apache.coyote.ProtocolHandler
- Throws:
java.lang.Exception
getAdapter
public org.apache.coyote.Adapter getAdapter()
- Specified by:
getAdapter in interface org.apache.coyote.ProtocolHandler
getAttribute
public java.lang.Object getAttribute(java.lang.String attribute)
-
- Specified by:
getAttribute in interface org.apache.coyote.ProtocolHandler
getAttributeNames
public java.util.Iterator getAttributeNames()
-
- Specified by:
getAttributeNames in interface org.apache.coyote.ProtocolHandler
init
public void init()
throws java.lang.Exception
-
- Specified by:
init in interface org.apache.coyote.ProtocolHandler
- Throws:
java.lang.Exception
pause
public void pause()
throws java.lang.Exception
- Specified by:
pause in interface org.apache.coyote.ProtocolHandler
- Throws:
java.lang.Exception
resume
public void resume()
throws java.lang.Exception
- Specified by:
resume in interface org.apache.coyote.ProtocolHandler
- Throws:
java.lang.Exception
setAdapter
public void setAdapter(org.apache.coyote.Adapter adapter)
- Specified by:
setAdapter in interface org.apache.coyote.ProtocolHandler
setAttribute
public void setAttribute(java.lang.String arg0,
java.lang.Object arg1)
-
- Specified by:
setAttribute in interface org.apache.coyote.ProtocolHandler
start
public void start()
throws java.lang.Exception
- Specified by:
start in interface org.apache.coyote.ProtocolHandler
- Throws:
java.lang.Exception
getRandomPortNumber
public static int getRandomPortNumber(int min,
int max)
- Returns a random local port number, greater than min and lower than max.
- Parameters:
min - the minimum allowed value for the returned port number.max - the maximum allowed value for the returned port number.
- Returns:
- a random int located between greater than min and lower than max.
getSignalingTransport
public java.lang.String getSignalingTransport()
- Returns:
- the signalingTransport
setSignalingTransport
public void setSignalingTransport(java.lang.String transport)
- Parameters:
signalingTransport - the signalingTransport to set
getPort
public int getPort()
- Returns:
- the port
setPort
public void setPort(int port)
- Parameters:
port - the port to set
setIpAddress
public void setIpAddress(java.lang.String ipAddress)
getIpAddress
public java.lang.String getIpAddress()
getStunServerAddress
public java.lang.String getStunServerAddress()
- Returns:
- the stunServerAddress
setStunServerAddress
public void setStunServerAddress(java.lang.String stunServerAddress)
- Parameters:
stunServerAddress - the stunServerAddress to set
getStunServerPort
public int getStunServerPort()
- Returns:
- the stunServerPort
setStunServerPort
public void setStunServerPort(int stunServerPort)
- Parameters:
stunServerPort - the stunServerPort to set
isUseStun
public boolean isUseStun()
- Returns:
- the useStun
setUseStun
public void setUseStun(boolean useStun)
- Parameters:
useStun - the useStun to set
getAddress
public java.net.InetAddress getAddress()
setAddress
public void setAddress(java.net.InetAddress ia)
getName
public java.lang.String getName()
setSipStackPropertiesFile
public void setSipStackPropertiesFile(java.lang.String sipStackPropertiesFile)
- Parameters:
sipStackPropertiesFile - the sipStackPropertiesFile to set
getSipStackPropertiesFile
public java.lang.String getSipStackPropertiesFile()
- Returns:
- the sipStackPropertiesFile
getObjectName
public javax.management.ObjectName getObjectName()
getDomain
public java.lang.String getDomain()
preRegister
public javax.management.ObjectName preRegister(javax.management.MBeanServer server,
javax.management.ObjectName name)
throws java.lang.Exception
- Specified by:
preRegister in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
postRegister
public void postRegister(java.lang.Boolean registrationDone)
- Specified by:
postRegister in interface javax.management.MBeanRegistration
preDeregister
public void preDeregister()
throws java.lang.Exception
- Specified by:
preDeregister in interface javax.management.MBeanRegistration
- Throws:
java.lang.Exception
postDeregister
public void postDeregister()
- Specified by:
postDeregister in interface javax.management.MBeanRegistration
Copyright © 2008. All Rights Reserved.