Package org.mokai

Examples of org.mokai.Acceptor


      routingEngine.start();

      // create the processor
      MockProcessor processor = new MockProcessor();
      ConnectorService processorService = routingEngine.addConnection("1", processor);
      processorService.addAcceptor(new Acceptor() {

        @Override
        public boolean accepts(Message message) {
          return false;
        }
View Full Code Here


      when(applicationProcessor.supports(any(Message.class))).thenReturn(true);

      ConnectorService connectionService = routingEngine.addConnection("1", connectionProcessor);
      ConnectorService applicationService = routingEngine.addApplication("1", applicationProcessor);

      Acceptor acceptor = new Acceptor() {

        @Override
        public boolean accepts(Message message) {
          return true;
        }
View Full Code Here

  @Test
  public void testAddRemoveAcceptors() throws Exception {
    ConnectorService processorService = new MockConnectorService("test", new MockProcessor(), resourceRegistry);

    Acceptor acceptor1 = Mockito.mock(Acceptor.class);
    Acceptor acceptor2 = Mockito.mock(Acceptor.class);

    // add first acceptor
    processorService.addAcceptor(acceptor1);
    Assert.assertEquals(1, processorService.getAcceptors().size());
View Full Code Here

  @Test
  public void testAddRemoveConfigurableAcceptor() throws Exception {
    ConnectorService processorService = new MockConnectorService("test", Mockito.mock(Processor.class), resourceRegistry);

    Acceptor configurableAcceptor = Mockito.mock(Acceptor.class,
        Mockito.withSettings().extraInterfaces(Configurable.class));

    processorService.addAcceptor(configurableAcceptor);
    processorService.removeAcceptor(configurableAcceptor);
View Full Code Here

TOP

Related Classes of org.mokai.Acceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.