- inject SipManager using Spring
git-svn-id: http://bigbluebutton.googlecode.com/svn/trunk@3070 af16638f-c34d-0410-8cfa-b39d5352b314
This commit is contained in:
parent
11e8ba68fb
commit
4391bab0c3
@ -11,13 +11,8 @@ public final class SipUserManager {
|
||||
private static final Logger log = Red5LoggerFactory.getLogger( SipUserManager.class, "sip" );
|
||||
|
||||
private static Map<String, SipUser> sessions;
|
||||
private static SipUserManager singleton = new SipUserManager();
|
||||
|
||||
public static SipUserManager getInstance() {
|
||||
return singleton;
|
||||
}
|
||||
|
||||
private SipUserManager() {
|
||||
|
||||
public SipUserManager() {
|
||||
sessions = Collections.synchronizedMap(new HashMap<String, SipUser>());
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,6 @@ public class SipPhoneApplication extends MultiThreadedApplicationAdapter impleme
|
||||
@Override
|
||||
public boolean appStart( IScope scope ) {
|
||||
loginfo( "Red5SIP starting in scope " + scope.getName() + " " + System.getProperty( "user.dir" ) );
|
||||
sipManager = SipUserManager.getInstance();
|
||||
loginfo("Red5SIP using RTP port range " + startRTPPort + "-" + stopRTPPort + ", using SIP port range " + startSIPPort + "-" + stopSIPPort);
|
||||
|
||||
sipPort = startSIPPort;
|
||||
@ -298,4 +297,8 @@ public class SipPhoneApplication extends MultiThreadedApplicationAdapter impleme
|
||||
|
||||
log.info( s );
|
||||
}
|
||||
|
||||
public void setSipUserManager(SipUserManager sum) {
|
||||
sipManager = sum;
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,6 @@ public class VoiceConferenceApplication extends MultiThreadedApplicationAdapter
|
||||
@Override
|
||||
public boolean appStart(IScope scope) {
|
||||
log.debug("VoiceConferenceApplication appStart[" + scope.getName() + "]");
|
||||
sipManager = SipUserManager.getInstance();
|
||||
sipPort = startSIPPort;
|
||||
rtpPort = startRTPPort;
|
||||
return true;
|
||||
@ -227,4 +226,8 @@ public class VoiceConferenceApplication extends MultiThreadedApplicationAdapter
|
||||
public void setCallExtensionPattern(String callExtensionPattern) {
|
||||
this.callExtensionPattern = new MessageFormat(callExtensionPattern);
|
||||
}
|
||||
|
||||
public void setSipUserManager(SipUserManager sum) {
|
||||
sipManager = sum;
|
||||
}
|
||||
}
|
||||
|
@ -23,16 +23,11 @@
|
||||
|
||||
package org.zoolu.sip.provider;
|
||||
|
||||
|
||||
import org.zoolu.tools.Configure;
|
||||
import org.zoolu.tools.Parser;
|
||||
import org.zoolu.tools.Log;
|
||||
import org.zoolu.tools.RotatingLog;
|
||||
import org.zoolu.tools.Timer;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
/** SipStack includes all static attributes used by the sip stack.
|
||||
* <p>
|
||||
|
@ -35,8 +35,8 @@
|
||||
<property name="startRTPPort" value="${startRTPPort}" />
|
||||
<property name="stopRTPPort" value="${stopRTPPort}" />
|
||||
<property name="callExtensionPattern" value="${callExtensionPattern}" />
|
||||
<property name="sipUserManager" ref="sipUserManager"/>
|
||||
</bean>
|
||||
|
||||
<!--bean id="web.handler" class="org.red5.server.webapp.sip.Application">
|
||||
</bean-->
|
||||
<bean id="sipUserManager" class="org.red5.app.sip.SipUserManager"/>
|
||||
</beans>
|
||||
|
Loading…
Reference in New Issue
Block a user