Package org.apache.openejb.server

Examples of org.apache.openejb.server.DiscoveryListener


            }
        });

        private void fireServiceRemovedEvent(final URI uri) {
            if (discoveryListener != null) {
                final DiscoveryListener discoveryListener = this.discoveryListener;

                // Have the listener process the event async so that
                // he does not block this thread since we are doing time sensitive
                // processing of events.
                executor.execute(new Runnable() {
                    public void run() {
                        if (discoveryListener != null) {
                            discoveryListener.serviceRemoved(uri);
                        }
                    }
                });
            }
        }
View Full Code Here


            }
        }

        private void fireServiceAddedEvent(final URI uri) {
            if (discoveryListener != null) {
                final DiscoveryListener discoveryListener = this.discoveryListener;

                // Have the listener process the event async so that
                // he does not block this thread since we are doing time sensitive
                // processing of events.
                executor.execute(new Runnable() {
                    public void run() {
                        if (discoveryListener != null) {
                            discoveryListener.serviceAdded(uri);
                        }
                    }
                });
            }
        }
View Full Code Here

        final CountDownLatch[] latches = {
                new CountDownLatch(PEERS + 1),
                new CountDownLatch(PEERS + 1)
        };

        final DiscoveryListener listener = new DiscoveryListener() {
            public void serviceAdded(URI service) {
                System.out.println("added = " + service);
                if (testService.equals(service)) {
                    latches[0].countDown();
                }
View Full Code Here

        }
    });

    private void fireServiceRemovedEvent(final URI uri) {
        if (discoveryListener != null) {
            final DiscoveryListener discoveryListener = this.discoveryListener;

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    if (discoveryListener != null) {
                        discoveryListener.serviceRemoved(uri);
                    }
                }
            });
        }
    }
View Full Code Here

        }
    }

    private void fireServiceAddedEvent(final URI uri) {
        if (discoveryListener != null) {
            final DiscoveryListener discoveryListener = this.discoveryListener;

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    if (discoveryListener != null) {
                        discoveryListener.serviceAdded(uri);
                    }
                }
            });
        }
    }
View Full Code Here

        if (debug()) {
            log.debug(String.format("Removed Service{uri=%s}", uri));
        }

        if (discoveryListener != null) {
            final DiscoveryListener discoveryListener = this.discoveryListener;

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    if (discoveryListener != null) {
                        discoveryListener.serviceRemoved(uri);
                    }
                }
            });
        }
    }
View Full Code Here

        if (debug()) {
            log.debug(String.format("Added Service{uri=%s}", uri));
        }

        if (discoveryListener != null) {
            final DiscoveryListener discoveryListener = this.discoveryListener;

            // Have the listener process the event async so that
            // he does not block this thread since we are doing time sensitive
            // processing of events.
            executor.execute(new Runnable() {
                public void run() {
                    if (discoveryListener != null) {
                        discoveryListener.serviceAdded(uri);
                    }
                }
            });
        }
    }
View Full Code Here

        final CountDownLatch[] latches = {
                new CountDownLatch(PEERS + 1),
                new CountDownLatch(PEERS + 1)
        };

        final DiscoveryListener listener = new DiscoveryListener() {
            public void serviceAdded(URI service) {
                System.out.println("added = " + service);
                if (testService.equals(service)) {
                    latches[0].countDown();
                }
View Full Code Here

        final CountDownLatch[] latches = {
            new CountDownLatch(PEERS + 1),
            new CountDownLatch(PEERS + 1)
        };

        final DiscoveryListener listener = new DiscoveryListener() {
            public void serviceAdded(final URI service) {
                System.out.println("added = " + service);
                if (testService.equals(service)) {
                    latches[0].countDown();
                }
View Full Code Here

    }

    @Test
    public void testBroadcastBadUri() throws Exception {

        final DiscoveryListener original = agent.getDiscoveryListener();

        final CountDownLatch latch = new CountDownLatch(1);

        final DiscoveryListener listener = new DiscoveryListener() {
            @Override
            public void serviceAdded(final URI service) {
                latch.countDown();
                System.out.println("added = " + service);
            }
View Full Code Here

TOP

Related Classes of org.apache.openejb.server.DiscoveryListener

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.