Examples of listener()


Examples of bear.ssh.MyStreamCopier.listener()

        final MarkedBuffer buffer = new MarkedBuffer(stdErr);

        copiers.add(copier);
        buffers.add(buffer);

        copier.listener(new MyStreamCopier.Listener() {
            @Override
            public void reportProgress(long transferred, byte[] buf, int read) throws Exception {
                synchronized (baos){
                    buffer.progress(baos.getBuffer(), baos.getLength());
                }
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

        HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", 8080));
        HttpConnectionOverHTTP connection = new HttpConnectionOverHTTP(endPoint, destination);
        Request request = client.newRequest(URI.create("http://localhost/"));
        final CountDownLatch headersLatch = new CountDownLatch(1);
        final CountDownLatch successLatch = new CountDownLatch(1);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onHeaders(Request request)
            {
                headersLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

        endPoint.shutdownOutput();
        HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", 8080));
        HttpConnectionOverHTTP connection = new HttpConnectionOverHTTP(endPoint, destination);
        Request request = client.newRequest(URI.create("http://localhost/"));
        final CountDownLatch failureLatch = new CountDownLatch(2);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onFailure(Request request, Throwable x)
            {
                failureLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

        ByteArrayEndPoint endPoint = new ByteArrayEndPoint("", 16);
        HttpDestinationOverHTTP destination = new HttpDestinationOverHTTP(client, new Origin("http", "localhost", 8080));
        HttpConnectionOverHTTP connection = new HttpConnectionOverHTTP(endPoint, destination);
        Request request = client.newRequest(URI.create("http://localhost/"));
        final CountDownLatch failureLatch = new CountDownLatch(2);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onFailure(Request request, Throwable x)
            {
                failureLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

        Request request = client.newRequest(URI.create("http://localhost/"));
        String content = "abcdef";
        request.content(new ByteBufferContentProvider(ByteBuffer.wrap(content.getBytes(StandardCharsets.UTF_8))));
        final CountDownLatch headersLatch = new CountDownLatch(1);
        final CountDownLatch successLatch = new CountDownLatch(1);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onHeaders(Request request)
            {
                headersLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

        String content1 = "0123456789";
        String content2 = "abcdef";
        request.content(new ByteBufferContentProvider(ByteBuffer.wrap(content1.getBytes(StandardCharsets.UTF_8)), ByteBuffer.wrap(content2.getBytes(StandardCharsets.UTF_8))));
        final CountDownLatch headersLatch = new CountDownLatch(1);
        final CountDownLatch successLatch = new CountDownLatch(1);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onHeaders(Request request)
            {
                headersLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

                return -1;
            }
        });
        final CountDownLatch headersLatch = new CountDownLatch(1);
        final CountDownLatch successLatch = new CountDownLatch(1);
        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onHeaders(Request request)
            {
                headersLatch.countDown();
View Full Code Here

Examples of org.eclipse.jetty.client.api.Request.listener()

            if (_aborted)
                throw new IllegalStateException("Aborted");
            _requests.add(request);
        }

        request.listener(new Request.Listener.Adapter()
        {
            @Override
            public void onHeaders(Request request)
            {
                listener.onSending(messages);
View Full Code Here

Examples of org.eweb4j.mvc.upload.Upload.listener()

    factory.setRepository(new File(tmpDir));
   
    ServletFileUpload _upload = new ServletFileUpload(factory);
    _upload.setSizeMax(sizeMax);
    if (upload != null){
      Class<?> clazz = upload.listener();
      if (!void.class.isAssignableFrom(clazz) && ProgressListener.class.isAssignableFrom(clazz))
        _upload.setProgressListener((ProgressListener) clazz.newInstance());
    }
   
    try{
View Full Code Here

Examples of org.jbpm.services.task.HumanTaskConfigurator.listener()

            .userGroupCallback(userGroupCallback)
            .userInfo(userInfo);

            if (listeners != null) {
                for(TaskLifeCycleEventListener listener : listeners) {
                    configurator.listener(listener);
                }
            }
            Environment environment = EnvironmentFactory.newEnvironment();
            environment.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager);
            environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, entityManagerFactory);
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.