Examples of register()


Examples of com.google.common.eventbus.AsyncEventBus.register()

   @Provides
   @Singleton
   AsyncEventBus provideAsyncEventBus(@Named(PROPERTY_USER_THREADS) ListeningExecutorService userExecutor,
         DeadEventLoggingHandler deadEventsHandler) {// NO_UCD
      AsyncEventBus asyncBus = new AsyncEventBus("jclouds-async-event-bus", userExecutor);
      asyncBus.register(deadEventsHandler);
      return asyncBus;
   }

   /**
    * Provides asynchronous {@link EventBus}.

Examples of com.google.common.eventbus.EventBus.register()

          PollingZooKeeperConfigurationProvider zookeeperConfigurationProvider =
            new PollingZooKeeperConfigurationProvider(
              agentName, zkConnectionStr, baseZkPath, eventBus);
          components.add(zookeeperConfigurationProvider);
          application = new Application(components);
          eventBus.register(application);
        } else {
          StaticZooKeeperConfigurationProvider zookeeperConfigurationProvider =
            new StaticZooKeeperConfigurationProvider(
              agentName, zkConnectionStr, baseZkPath);
          application = new Application();

Examples of com.google.common.io.Closer.register()

    public Object addingService(ServiceReference reference) {
        Object service = bundleContext.getService(reference);

        if (service instanceof Observer) {
            Closer subscription = Closer.create();
            BackgroundObserver observer = subscription.register(
                    new BackgroundObserver((Observer) service, executor));
            subscription.register(
                    observable.addObserver(observer));
            subscriptions.put(reference, subscription);
            return service;

Examples of com.google.feedserver.util.BeanCliHelper.register()

    LOG.info("Agent handshake version = " + SdcConnection.INITIAL_HANDSHAKE_MSG);

    // validate the localConf.xml file and the input args
    try {
      BeanCliHelper beanCliHelper = new BeanCliHelper();
      beanCliHelper.register(localConf);
      beanCliHelper.parse(args);
      new LocalConfValidator().validate(localConf);
    } catch (LocalConfException e) {
      LOG.fatal("Configuration error", e);
      return;

Examples of com.google.feedserver.util.CommonsCliHelper.register()

   * @return The client helper
   */
  @SuppressWarnings("unchecked")
  protected CommonsCliHelper createClientHelper(String[] args, Class clazz) {
    CommonsCliHelper cliHelper = new CommonsCliHelper();
    cliHelper.register(clazz);
    cliHelper.parse(args);

    return cliHelper;
  }

Examples of com.google.gwt.place.shared.PlaceHistoryHandler.register()

        activityManager.setDisplay(display);

        // Start PlaceHistoryHandler with our PlaceHistoryMapper
        PresenterPlaceHistoryMapper historyMapper= GWT.create(PresenterPlaceHistoryMapper.class);
        PlaceHistoryHandler historyHandler = new PlaceHistoryHandler(historyMapper);
        historyHandler.register(placeController, eventBus, defaultPlace);

        RootLayoutPanel.get().add(display);
        // Goes to the place represented on URL else default place
        historyHandler.handleCurrentHistory();
  }

Examples of com.google.inject.spi.TypeEncounter.register()

public class LifecycleTypeListenerTest {
    @Test
    public void testHearInitializable() throws Exception {
        TypeEncounter encounter = createMock(TypeEncounter.class);

        encounter.register(anyObject(InitializableInjectionListener.class));

        replay(encounter);

        LifecycleTypeListener underTest = new LifecycleTypeListener(null);

Examples of com.google.k2crypto.keyversions.KeyVersionRegistry.register()

    K2Storage storage = new K2Storage(context);
   
    // Register available key versions
    KeyVersionRegistry registry = context.getKeyVersionRegistry();
    try {
      registry.register(AESKeyVersion.class);
      registry.register(HMACKeyVersion.class);
    } catch (KeyVersionException ex) {
      // Something wrong with a key version
      throw ex;
    }

Examples of com.google.nigori.client.Datastore.register()

  @Test
  public void test() throws NigoriCryptographyException, IOException, UnauthorisedException {
    Datastore nigori = getStore();
    for (int i = 0; i < AcceptanceTests.REPEAT; ++i) {// check we can do this more than once
      assertTrue("Not registered", nigori.register());
      assertTrue("Can't authenticate", nigori.authenticate());
      assertTrue("Can't unregister", nigori.unregister());
      assertFalse("Authenticated after unregistration", nigori.authenticate());
      assertFalse("Could re-unregister", nigori.unregister());
    }

Examples of com.google.nigori.client.MigoriDatastore.register()

public class MSetGetTest extends AcceptanceTest {

  @Test
  public void putGraph() throws NigoriCryptographyException, IOException, UnauthorisedException {
    MigoriDatastore store = getStore();
    store.register();
    try {
      Index index = new Index("test");
      RevValue a = store.put(index, "a".getBytes());
      RevValue b = store.put(index, "b".getBytes(), a);
      RevValue c = store.put(index, "c".getBytes(), a);
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.