src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java
/**
     * Puts the <tt>CallPeer</tt>s of a specific <tt>Call</tt> on hold.
     *
     * @param call the <tt>Call</tt> the <tt>CallPeer</tt>s of which are to be
     * put on hold
     */
Puts the CallPeers of a specific Call on hold.
@param call the Call the CallPeers of which are to be
put on hold
Puts the CallPeers of a specific Call on hold . @param call the Call the CallPeers of which are to be put on hold
private void putOnHold(Call call)
    {
        OperationSetBasicTelephony<?> telephony
            = call.getProtocolProvider().getOperationSet(
                    OperationSetBasicTelephony.class);
        if (telephony != null)
        {
            for (Iterator<? extends CallPeer> peerIter = call.getCallPeers();
                    peerIter.hasNext();)
            {
                CallPeer peer = peerIter.next();
                CallPeerState peerState = peer.getState();
                if (!CallPeerState.DISCONNECTED.equals(peerState)
                        && !CallPeerState.FAILED.equals(peerState)
                        && !CallPeerState.isOnHold(peerState))
                {
                    try
                    {
                        telephony.putOnHold(peer);
                    }
                    catch (OperationFailedException ex)
                    {
                        logger.error("Failed to put " + peer + " on hold.", ex);
                    }
                }
            }
        }
    }
private void putOnHold ( Call call ) { OperationSetBasicTelephony < ? > telephony = call . getProtocolProvider ( ) . getOperationSet ( OperationSetBasicTelephony . class ) ; if ( telephony != null ) { for ( Iterator < ? extends CallPeer > peerIter = call . getCallPeers ( ) ; peerIter . hasNext ( ) ; ) { CallPeer peer = peerIter . next ( ) ; CallPeerState peerState = peer . getState ( ) ; if ( ! CallPeerState . DISCONNECTED . equals ( peerState ) && ! CallPeerState . FAILED . equals ( peerState ) && ! CallPeerState . isOnHold ( peerState ) ) { try { telephony . putOnHold ( peer ) ; } catch ( OperationFailedException ex ) { logger . error ( "Failed to put " + peer + " on hold." , ex ) ; } } } } }
Puts the <tt>CallPeer</tt>s of a specific <tt>Call</tt> on hold.
Puts the <tt > CallPeer< / tt > s of a specific <tt > Call< / tt > on hold .