Examples of addListener()


Examples of org.eclipse.ecf.core.IContainer.addListener()

    };
  }

  public void testClientListener() throws Exception {
    final IContainer client = getClients()[0];
    client.addListener(createListener());
    assertTrue(clientConnectingEvents.size() == 0);
    assertTrue(clientConnectedEvents.size() == 0);
    client.connect(createServerID(), null);
    assertTrue(clientConnectingEvents.size() == 1);
    assertTrue(clientConnectedEvents.size() == 1);
View Full Code Here

Examples of org.eclipse.ecf.core.IContainerManager.addListener()

    @Override
    public IStatus run(IProgressMonitor monitor) {
        IContainerManager containerManager = ECFContribution.getDefault().getContainerManager();
        if (containerManager == null)
            return new Status(IStatus.WARNING, ECFContribution.PLUGIN_ID, IStatus.WARNING, "no container manager available", null);
        containerManager.addListener(containerManagerListener);
        return Status.OK_STATUS;       
    }
}
View Full Code Here

Examples of org.eclipse.ecf.filetransfer.events.socket.ISocketEventSource.addListener()

  protected void handleStartConnectEvent(IFileTransferConnectStartEvent event) {
    super.handleStartConnectEvent(event);
    this.socketEvents = SocketEventTestUtil.observeSocketEvents(event);
    ISocketEventSource source = (ISocketEventSource) event
        .getAdapter(ISocketEventSource.class);
    source.addListener(new ISocketListener() {

      public void handleSocketEvent(ISocketEvent event) {
        if (event instanceof ISocketConnectedEvent) {
          ISocketConnectedEvent connectedEvent = (ISocketConnectedEvent) event;
          socketInReadWrapper = new SocketInReadWrapper(
View Full Code Here

Examples of org.eclipse.jetty.io.Connection.addListener()

    }

    @Override
    public Connection newConnection(Connector connector, EndPoint endPoint) {
        final Connection connection = connectionFactory.newConnection(connector, endPoint);
        connection.addListener(new Connection.Listener() {
            private Timer.Context context;

            @Override
            public void onOpened(Connection connection) {
                this.context = timer.time();
View Full Code Here

Examples of org.eclipse.jetty.rhttp.client.JettyClient.addListener()

        HttpClient httpClient = new HttpClient();
        httpClient.setConnectorType(HttpClient.CONNECTOR_SOCKET);
        httpClient.start();

        RHTTPClient client = new JettyClient(httpClient, new Address("localhost", plainConnector.getPort()), server.getContext().getContextPath() + "/gw", "proxy");
        client.addListener(new ProxyListener(httpClient, client));
        client.connect();

        Runtime.getRuntime().addShutdownHook(new Shutdown(server, httpClient, client));
        logger.info("{} started", GatewayProxyServer.class.getSimpleName());
    }
View Full Code Here

Examples of org.eclipse.jetty.rhttp.client.RHTTPClient.addListener()

        HttpClient httpClient = new HttpClient();
        httpClient.setConnectorType(HttpClient.CONNECTOR_SOCKET);
        httpClient.start();

        RHTTPClient client = new JettyClient(httpClient, new Address("localhost", plainConnector.getPort()), server.getContext().getContextPath() + "/gw", "proxy");
        client.addListener(new ProxyListener(httpClient, client));
        client.connect();

        Runtime.getRuntime().addShutdownHook(new Shutdown(server, httpClient, client));
        logger.info("{} started", GatewayProxyServer.class.getSimpleName());
    }
View Full Code Here

Examples of org.eclipse.jetty.server.HttpChannelState.addListener()

            activeDispatches.dec();
            dispatches.update(dispatched, TimeUnit.MILLISECONDS);

            if (state.isSuspended()) {
                if (state.isInitial()) {
                    state.addListener(listener);
                }
                activeSuspended.inc();
            } else if (state.isInitial()) {
                updateResponses(httpRequest, httpResponse, start);
            }
View Full Code Here

Examples of org.eclipse.jetty.spdy.api.Session.addListener()

        headers.put("version", "http/1.1");
        headers.put("host", "localhost:8080");
        headers.put("content-type", "application/octet-stream");

        final CountDownLatch latch = new CountDownLatch(count * iterations);
        session.addListener(new Session.StreamListener.Adapter()
        {
            @Override
            public void onStreamClosed(Stream stream)
            {
                latch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.spdy.parser.Parser.addListener()

        assertThat("buffer is not null", buffer, not(nullValue()));

        TestSPDYParserListener listener = new TestSPDYParserListener();
        Parser parser = new Parser(new StandardCompressionFactory().newDecompressor());
        parser.addListener(listener);
        parser.parse(buffer);
        ControlFrame frame2 = listener.getControlFrame();

        assertThat("frame2 is not null", frame2, not(nullValue()));
        assertThat("frame2 is type RST_STREAM",ControlFrameType.RST_STREAM, equalTo(frame2.getType()));
View Full Code Here

Examples of org.eclipse.jetty.util.Scanner.addListener()

                Scanner scanner = new Scanner();
                scanner.setScanInterval(interval);

                scanner.setRecursive(true);
                scanner.addListener(new Scanner.BulkListener() {
                    @Override
                    public void filesChanged(List<String> filenames)
                            throws Exception {
                        webappcontext.stop();
                        server.stop();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.