src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java
/**
     * Handles the registering and unregistering of
     * <tt>OperationSetBasicTelephony</tt> instances in order to apply or
     * unapply the rules of this policy to the <tt>Call</tt>s originating from
     * them.
     *
     * @param ev a <tt>ServiceEvent</tt> value which described a change in an
     * OSGi service and which is to be examined for the registering or
     * unregistering of a <tt>ProtocolProviderService</tt> and thus a
     * <tt>OperationSetBasicTelephony</tt>
     */
Handles the registering and unregistering of
OperationSetBasicTelephony instances in order to apply or
unapply the rules of this policy to the Calls originating from
them.

@param ev a ServiceEvent value which described a change in an
OSGi service and which is to be examined for the registering or
unregistering of a ProtocolProviderService and thus a
OperationSetBasicTelephony
Handles the registering and unregistering of OperationSetBasicTelephony instances in order to apply or unapply the rules of this policy to the Calls originating from them . @param ev a ServiceEvent value which described a change in an OSGi service and which is to be examined for the registering or unregistering of a ProtocolProviderService and thus a OperationSetBasicTelephony
private void serviceChanged(ServiceEvent ev)
    {
        Object service = bundleContext.getService(ev.getServiceReference());
        if (service instanceof ProtocolProviderService)
        {
            if(logger.isTraceEnabled())
            {
                logger.trace("Protocol provider service changed.");
            }
            OperationSetBasicTelephony<?> telephony
                = ((ProtocolProviderService) service).getOperationSet(
                        OperationSetBasicTelephony.class);
            if (telephony != null)
            {
                switch (ev.getType())
                {
                case ServiceEvent.REGISTERED:
                    addOperationSetBasicTelephonyListener(telephony);
                    break;
                case ServiceEvent.UNREGISTERING:
                    removeOperationSetBasicTelephonyListener(telephony);
                    break;
                }
            }
            else
            {
                if(logger.isTraceEnabled())
                {
                    logger.trace("The protocol provider service doesn't support "
                        + "telephony.");
                }
            }
        }
    }
private void serviceChanged ( ServiceEvent ev ) { Object service = bundleContext . getService ( ev . getServiceReference ( ) ) ; if ( service instanceof ProtocolProviderService ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Protocol provider service changed." ) ; } OperationSetBasicTelephony < ? > telephony = ( ( ProtocolProviderService ) service ) . getOperationSet ( OperationSetBasicTelephony . class ) ; if ( telephony != null ) { switch ( ev . getType ( ) ) { case ServiceEvent . REGISTERED : addOperationSetBasicTelephonyListener ( telephony ) ; break ; case ServiceEvent . UNREGISTERING : removeOperationSetBasicTelephonyListener ( telephony ) ; break ; } } else { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "The protocol provider service doesn't support " + "telephony." ) ; } } } }
Handles the registering and unregistering of
 <tt>OperationSetBasicTelephony</tt> instances in order to apply or
 unapply the rules of this policy to the <tt>Call</tt>s originating from
 them.
Handles the registering and unregistering of <tt > OperationSetBasicTelephony< / tt > instances in order to apply or unapply the rules of this policy to the <tt > Call< / tt > s originating from them .