Examples of Registrations


Examples of com.goodow.realtime.core.Registrations

   * @param internalApi The driver for the GWT collaborative libraries.
   * @param errorHandler The third-party error handling function.
   */
  DocumentImpl(final DocumentBridge internalApi, final Handler<Error> errorHandler) {
    model = new ModelImpl(internalApi, this);
    handlerRegs = new Registrations();
    collaborators = Json.createObject();

    Bus bus = internalApi.store.getBus();
    if (errorHandler != null) {
      handlerRegs.wrap(bus.subscribeLocal(
View Full Code Here

Examples of org.izi.Registrations

   }

   private void genericAddListener()
   {
      Object target = handler.target;
      Registrations registrations = Registrations.registrationsFor(listenerClass);
      Registration listenerRegistration = registrations.getFor(target);
      if (listenerRegistration != null)
      {
         try
         {
            listenerRegistration.register(listener, target);
View Full Code Here

Examples of org.izi.Registrations

   }

   private void genericRemoveListener()
   {
      Object target = handler.target;
      Registrations registrations = Registrations.registrationsFor(listenerClass);
      Registration listenerRegistration = registrations.getFor(target);
      if (listenerRegistration != null)
      {
         try
         {
            listenerRegistration.unRegister(listener, target);
View Full Code Here

Examples of org.jboss.aerogear.android.unifiedpush.Registrations

   
    private static final String PUSH = "push";
   
    @Test
    public void testDefaultConfig() throws URISyntaxException {
        Registrations reg = new Registrations();
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        reg.push(PUSH, config);
        PushRegistrar registrar = reg.get(PUSH);
        assertNotNull(registrar);
        assertTrue(registrar instanceof AeroGearGCMPushRegistrar);        
    }
View Full Code Here

Examples of org.jboss.aerogear.android.unifiedpush.Registrations

        assertTrue(registrar instanceof AeroGearGCMPushRegistrar);        
    }
   
    @Test(expected = IllegalArgumentException.class)
    public void testFailsOnUnsupportedType() throws URISyntaxException {
        Registrations reg = new Registrations();
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        config.setType(new PushType() {

            @Override
            public String getName() {
                return "FAIL_TYPE";
            }
        });
        reg.push(PUSH, config);
       
    }
View Full Code Here

Examples of org.jboss.aerogear.android.unifiedpush.Registrations

       
    }

    @Test
    public void testCustomFactoryType() throws URISyntaxException {
        Registrations reg = new Registrations(new PushRegistrarFactory() {

            @Override
            public PushRegistrar createPushRegistrar(PushConfig config) {
                if (config.getType().getName().equals("CUSTOM_TYPE")) {
                    return Mockito.mock(PushRegistrar.class);
                }
                else {
                    return null;
                }
            }
        });
        PushConfig config = new PushConfig(new URI("http://testreg.com"), "TestID");
        config.setType(new PushType() {

            @Override
            public String getName() {
                return "CUSTOM_TYPE";
            }
        });
        assertNotNull(reg.push(PUSH, config));
       
    }
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.