@ -33,8 +33,7 @@
* @author Sebastien Mazy
* /
public class SipStackSharing
implements SipListener ,
RegistrationStateChangeListener
implements SipListener
{
/ * *
* Logger for this class .
@ -127,7 +126,6 @@ public void addSipListener(ProtocolProviderServiceSipImpl listener)
if ( this . listeners . size ( ) = = 0 )
startListening ( ) ;
this . listeners . add ( listener ) ;
listener . addRegistrationStateChangeListener ( this ) ;
logger . trace ( this . listeners . size ( ) + " listeners now" ) ;
}
}
@ -139,7 +137,7 @@ public void addSipListener(ProtocolProviderServiceSipImpl listener)
*
* @param listener possible target to remove for the dispatching process .
* /
p rivate void removeSipListener ( ProtocolProviderServiceSipImpl listener )
p ublic void removeSipListener ( ProtocolProviderServiceSipImpl listener )
{
synchronized ( this . listeners )
{
@ -165,23 +163,6 @@ private Set<ProtocolProviderServiceSipImpl> getSipListeners()
}
}
/ * *
* Stops dispatching SIP messages to a SIP protocol provider service
* once it ' s been unregistered .
*
* @param event the change event in the registration state of a provider .
* /
public void registrationStateChanged ( RegistrationStateChangeEvent event )
{
if ( event . getNewState ( ) = = RegistrationState . UNREGISTERED )
{
ProtocolProviderServiceSipImpl listener
= ( ProtocolProviderServiceSipImpl ) event . getProvider ( ) ;
this . removeSipListener ( listener ) ;
listener . removeRegistrationStateChangeListener ( this ) ;
}
}
/ * *
* Returns the JAIN - SIP < tt > ListeningPoint < / tt > associated to the given
* transport string .