Search in sources :

Example 1 with XmlResponseProvider

use of jetbrains.communicator.core.transport.XmlResponseProvider in project intellij-plugins by JetBrains.

the class SendXmlMessageP2PCommand method createResponse.

private Element createResponse(Element rootElement, String remoteUser) {
    Element response = new Element("response", Transport.NAMESPACE);
    XmlResponseProvider provider = XmlResponseProvider.getProvider(rootElement, myEventBroadcaster);
    if (provider.processAndFillResponse(response, rootElement, myTransport, remoteUser)) {
        return response;
    }
    return null;
}
Also used : Element(org.jdom.Element) XmlResponseProvider(jetbrains.communicator.core.transport.XmlResponseProvider)

Example 2 with XmlResponseProvider

use of jetbrains.communicator.core.transport.XmlResponseProvider in project intellij-plugins by JetBrains.

the class BaseTestCase method registerResponseProviders.

protected void registerResponseProviders(UserModel userModel, IDEFacade ideFacade) {
    final XmlResponseProvider[] providers = { new GetVFileContentsProvider(ideFacade, userModel), new GetProjectsDataProvider(ideFacade, userModel), new CodePointerEventProvider(getBroadcaster()), new TextMessageEventProvider(getBroadcaster()), new BecomeAvailableXmlMessage() };
    for (XmlResponseProvider provider : providers) {
        Pico.getInstance().registerComponentInstance(provider);
    }
    disposeOnTearDown(new Disposable() {

        @Override
        public void dispose() {
            for (XmlResponseProvider provider : providers) {
                Pico.getInstance().unregisterComponentByInstance(provider);
            }
        }
    });
}
Also used : Disposable(org.picocontainer.Disposable) GetProjectsDataProvider(jetbrains.communicator.core.impl.transport.GetProjectsDataProvider) XmlResponseProvider(jetbrains.communicator.core.transport.XmlResponseProvider) BecomeAvailableXmlMessage(jetbrains.communicator.p2p.BecomeAvailableXmlMessage) CodePointerEventProvider(jetbrains.communicator.core.impl.transport.CodePointerEventProvider) TextMessageEventProvider(jetbrains.communicator.core.transport.TextMessageEventProvider) GetVFileContentsProvider(jetbrains.communicator.core.impl.transport.GetVFileContentsProvider)

Aggregations

XmlResponseProvider (jetbrains.communicator.core.transport.XmlResponseProvider)2 CodePointerEventProvider (jetbrains.communicator.core.impl.transport.CodePointerEventProvider)1 GetProjectsDataProvider (jetbrains.communicator.core.impl.transport.GetProjectsDataProvider)1 GetVFileContentsProvider (jetbrains.communicator.core.impl.transport.GetVFileContentsProvider)1 TextMessageEventProvider (jetbrains.communicator.core.transport.TextMessageEventProvider)1 BecomeAvailableXmlMessage (jetbrains.communicator.p2p.BecomeAvailableXmlMessage)1 Element (org.jdom.Element)1 Disposable (org.picocontainer.Disposable)1