Examples of addListener()


Examples of org.apache.openjpa.event.LifecycleEventManager.addListener()

        Listener listener = new Listener();

        assertFalse(mgr.hasLoadListeners(pc, meta));
        assertFalse(mgr.hasStoreListeners(pc, meta));

        mgr.addListener(listener, null);
        assertEquals(0, listener.load);
        assertEquals(0, listener.store);
        assertTrue(mgr.hasLoadListeners(pc, meta));
        assertTrue(mgr.hasStoreListeners(pc, meta));
        assertFalse(mgr.hasDirtyListeners(pc, meta));
View Full Code Here

Examples of org.apache.openjpa.lib.conf.Value.addListener()

        return;
      for (String key : values) {
        Value value = getRepository().getConfiguration()
          .getValue(key);
        if (value != null)
          value.addListener(this);
      }
    }
   
    public void valueChanged(Value val) {
      if (val != null && val.matches("DataCacheTimeout")) {
View Full Code Here

Examples of org.apache.openjpa.lib.jdbc.JDBCEventConnectionDecorator.addListener()

            JDBCEventConnectionDecorator ecd =
                new JDBCEventConnectionDecorator();
            Configurations.configureInstance(ecd, conf, opts);
            JDBCListener[] listeners = conf.getJDBCListenerInstances();
            for (int i = 0; i < listeners.length; i++)
                ecd.addListener(listeners[i]);
            decorators.add(ecd);

            // ask the DriverDataSource to provide any additional decorators
            if (ds instanceof DriverDataSource) {
                List decs = ((DriverDataSource) ds).
View Full Code Here

Examples of org.apache.poi.hssf.eventusermodel.HSSFRequest.addListener()

        formatListener = new FormatTrackingHSSFListener(this);
            HSSFRequest hssfRequest = new HSSFRequest();
            if (listenForAllRecords) {
                hssfRequest.addListenerForAllRecords(formatListener);
            } else {
                hssfRequest.addListener(formatListener, BOFRecord.sid);
                hssfRequest.addListener(formatListener, EOFRecord.sid);
                hssfRequest.addListener(formatListener, DateWindow1904Record.sid);
                hssfRequest.addListener(formatListener, CountryRecord.sid);
                hssfRequest.addListener(formatListener, BoundSheetRecord.sid);
                hssfRequest.addListener(formatListener, SSTRecord.sid);
View Full Code Here

Examples of org.apache.sshd.common.future.CloseFuture.addListener()

        } else if (ioServiceFactory != null) {
            future = ioServiceFactory.close(immediately);
        } else {
            future = CloseableUtils.closed();
        }
        future.addListener(new SshFutureListener<CloseFuture>() {
            public void operationComplete(CloseFuture future) {
                connector = null;
                ioServiceFactory = null;
                if (shutdownExecutor && executor != null) {
                    executor.shutdown();
View Full Code Here

Examples of org.apache.sshd.common.future.SshFuture.addListener()

            } else {
                if (state.compareAndSet(0, GRACEFUL)) {
                    log.debug("Closing {} gracefully", this);
                    SshFuture grace = doCloseGracefully();
                    if (grace != null) {
                        grace.addListener(new SshFutureListener() {
                            public void operationComplete(SshFuture future) {
                                if (state.compareAndSet(GRACEFUL, IMMEDIATE)) {
                                    doCloseImmediately();
                                }
                            }
View Full Code Here

Examples of org.apache.sshd.common.io.IoConnectFuture.addListener()

            }
        };
        connector = getSession().getFactoryManager().getIoServiceFactory()
                .createConnector(handler);
        IoConnectFuture future = connector.connect(address.toInetSocketAddress());
        future.addListener(new SshFutureListener<IoConnectFuture>() {
            public void operationComplete(IoConnectFuture future) {
                if (future.isConnected()) {
                    ioSession = future.getSession();
                    f.setOpened();
                } else if (future.getException() != null) {
View Full Code Here

Examples of org.apache.tapestry.internal.event.ComponentEventProperty.addListener()

    public void addEventListener(String componentId, String[] events,
            String methodName, String formId, boolean validateForm, boolean async)
    {
        ComponentEventProperty property = getComponentEvents(componentId);
       
        property.addListener(events, methodName, formId, validateForm, async);
    }
   
    /**
     * Adds a deferred event listener binding for the specified html element.
     *
 
View Full Code Here

Examples of org.apache.tapestry5.MarkupWriter.addListener()

        w.element("root");
        w.element("no-listener");

        w.write("before listener");

        w.addListener(l);

        w.element("listener");
        w.write("before n-w-l");
        w.element("nested-with-listener");
        w.write("n-w-l text");
View Full Code Here

Examples of org.apache.tuscany.core.context.Context.addListener()

                        // perform silent creation and manual shutdown registration
                        atomic.init();
                        destroyQueue.add(context);
                    }
                }
                context.addListener(this);
            }
        }
    }
}
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.