Search in sources :

Example 1 with AsyncMessageDispatcherImpl

use of jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl in project intellij-plugins by JetBrains.

the class AbstractTransportTestCase method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myIdeFacade = new MockIDEFacade(getClass());
    myUserModel = new UserModelImpl(getBroadcaster());
    myDispatcher = new AsyncMessageDispatcherImpl(getBroadcaster(), myIdeFacade);
    disposeOnTearDown(myUserModel);
    disposeOnTearDown(myDispatcher);
    registerResponseProviders(myUserModel, myIdeFacade);
    myTransport = createTransport();
    mySelf = createSelf();
}
Also used : MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) AsyncMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Example 2 with AsyncMessageDispatcherImpl

use of jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl in project intellij-plugins by JetBrains.

the class P2PTransportTest method setUp.

@Override
protected void setUp() throws Exception {
    super.setUp();
    myUserModel = new UserModelImpl(getBroadcaster());
    disposeOnTearDown(myUserModel);
    myIdeFacade = new MockIDEFacade(getClass());
    myIdeFacade.setReturnedProjects(new String[] { PROJECT_NAME });
    myDispatcher = new AsyncMessageDispatcherImpl(getBroadcaster(), myIdeFacade);
    disposeOnTearDown(myDispatcher);
    myTransport = new P2PTransport(myDispatcher, myUserModel, WAIT_USER_RESPONSES_TIMEOUT) {

        @Override
        protected void sendUserAddedCallback(User user) {
            super.sendUserAddedCallback(user);
            myLog += "sendUserAddedCallback" + user;
        }
    };
    Pico.getInstance().registerComponentInstance(myTransport);
    myLog = "";
    myProjectLevelContainer = Pico.getInstance().makeChildContainer();
}
Also used : MockUser(jetbrains.communicator.mock.MockUser) MockIDEFacade(jetbrains.communicator.mock.MockIDEFacade) AsyncMessageDispatcherImpl(jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl) UserModelImpl(jetbrains.communicator.core.impl.users.UserModelImpl)

Aggregations

AsyncMessageDispatcherImpl (jetbrains.communicator.core.impl.dispatcher.AsyncMessageDispatcherImpl)2 UserModelImpl (jetbrains.communicator.core.impl.users.UserModelImpl)2 MockIDEFacade (jetbrains.communicator.mock.MockIDEFacade)2 MockUser (jetbrains.communicator.mock.MockUser)1