src/net/java/sip/communicator/impl/protocol/sip/OperationSetDesktopSharingServerSipImpl.java
/**
         * Notifies this <tt>Subscription</tt> that an active NOTIFY
         * <tt>Request</tt> has been received and it may process the specified
         * raw content carried in it.
         *
         * @param requestEvent
         *            the <tt>RequestEvent</tt> carrying the full details of the
         *            received NOTIFY <tt>Request</tt> including the raw content
         *            which may be processed by this <tt>Subscription</tt>
         * @param rawContent
         *            an array of bytes which represents the raw content carried
         *            in the body of the received NOTIFY <tt>Request</tt> and
         *            extracted from the specified <tt>RequestEvent</tt> for the
         *            convenience of the implementers
         * @see EventPackageSubscriber.Subscription#processActiveRequest(
         * RequestEvent, byte[])
         */
Notifies this Subscription that an active NOTIFY
Request has been received and it may process the specified
raw content carried in it.

@param requestEvent
the RequestEvent carrying the full details of the
received NOTIFY Request including the raw content
which may be processed by this Subscription
@param rawContent
an array of bytes which represents the raw content carried
in the body of the received NOTIFY Request and
extracted from the specified RequestEvent for the
convenience of the implementers
@see EventPackageSubscriber.Subscription#processActiveRequest(
RequestEvent, byte[])
Notifies this Subscription that an active NOTIFY Request has been received and it may process the specified raw content carried in it . @param requestEvent the RequestEvent carrying the full details of the received NOTIFY Request including the raw content which may be processed by this Subscription @param rawContent an array of bytes which represents the raw content carried in the body of the received NOTIFY Request and extracted from the specified RequestEvent for the convenience of the implementers @see EventPackageSubscriber . Subscription#processActiveRequest ( RequestEvent byte [] )
@Override
        protected void processActiveRequest(RequestEvent requestEvent,
                byte[] rawContent)
        {
            if(requestEvent.getDialog() != callPeer.getDialog())
            {
                if(callPeer.getCall() instanceof DesktopSharingCallSipImpl)
                {
                    Header dssidHeader = requestEvent.getRequest()
                        .getHeader(DesktopSharingCallSipImpl.DSSID_HEADER);
                    if(dssidHeader != null)
                    {
                        String dssid = dssidHeader.toString().replaceAll(
                            dssidHeader.getName() + ":", "").trim();
                        if(!dssid.equals(
                                ((DesktopSharingCallSipImpl)callPeer.getCall())
                                    .getDesktopSharingSessionID()))
                            return;
                    }
                    else
                        return;
                }
                else
                    return;
            }
            if (rawContent != null)
            {
                /* parse rawContent */
                Document document = null;
                Throwable exception = null;
                try
                {
                    DocumentBuilderFactory factory
                        = XMLUtils.newDocumentBuilderFactory();
                    document
                        = factory.newDocumentBuilder()
                                .parse(new ByteArrayInputStream(rawContent));
                }
                catch (IOException ioe)
                {
                    exception = ioe;
                }
                catch (ParserConfigurationException pce)
                {
                    exception = pce;
                }
                catch (SAXException saxe)
                {
                    exception = saxe;
                }
                if (exception != null)
                {
                    logger.error("Failed to parse remote-info XML", exception);
                }
                else
                {
                    Element root = document.getDocumentElement();
                    List<ComponentEvent> events = null;
                    Point p = getOrigin();
                    if(size == null)
                    {
                        size = (((VideoMediaFormat)
                            callPeer.getCall()
                            .getDefaultDevice(MediaType.VIDEO).getFormat())
                            .getSize());
                    }
                    events = DesktopSharingProtocolSipImpl.parse(root, size, p);
                    for(ComponentEvent evt : events)
                    {
                        if(evt instanceof MouseEvent)
                            processMouseEvent((MouseEvent)evt);
                        else if(evt instanceof KeyEvent)
                            processKeyboardEvent((KeyEvent)evt);
                    }
                }
            }
        }
@ Override protected void processActiveRequest ( RequestEvent requestEvent , byte [ ] rawContent ) { if ( requestEvent . getDialog ( ) != callPeer . getDialog ( ) ) { if ( callPeer . getCall ( ) instanceof DesktopSharingCallSipImpl ) { Header dssidHeader = requestEvent . getRequest ( ) . getHeader ( DesktopSharingCallSipImpl . DSSID_HEADER ) ; if ( dssidHeader != null ) { String dssid = dssidHeader . toString ( ) . replaceAll ( dssidHeader . getName ( ) + ":" , "" ) . trim ( ) ; if ( ! dssid . equals ( ( ( DesktopSharingCallSipImpl ) callPeer . getCall ( ) ) . getDesktopSharingSessionID ( ) ) ) return ; } else return ; } else return ; } if ( rawContent != null ) { /* parse rawContent */ Document document = null ; Throwable exception = null ; try { DocumentBuilderFactory factory = XMLUtils . newDocumentBuilderFactory ( ) ; document = factory . newDocumentBuilder ( ) . parse ( new ByteArrayInputStream ( rawContent ) ) ; } catch ( IOException ioe ) { exception = ioe ; } catch ( ParserConfigurationException pce ) { exception = pce ; } catch ( SAXException saxe ) { exception = saxe ; } if ( exception != null ) { logger . error ( "Failed to parse remote-info XML" , exception ) ; } else { Element root = document . getDocumentElement ( ) ; List < ComponentEvent > events = null ; Point p = getOrigin ( ) ; if ( size == null ) { size = ( ( ( VideoMediaFormat ) callPeer . getCall ( ) . getDefaultDevice ( MediaType . VIDEO ) . getFormat ( ) ) . getSize ( ) ) ; } events = DesktopSharingProtocolSipImpl . parse ( root , size , p ) ; for ( ComponentEvent evt : events ) { if ( evt instanceof MouseEvent ) processMouseEvent ( ( MouseEvent ) evt ) ; else if ( evt instanceof KeyEvent ) processKeyboardEvent ( ( KeyEvent ) evt ) ; } } } }
Notifies this <tt>Subscription</tt> that an active NOTIFY
 <tt>Request</tt> has been received and it may process the specified
 raw content carried in it.
Notifies this <tt > Subscription< / tt > that an active NOTIFY <tt > Request< / tt > has been received and it may process the specified raw content carried in it .