Package org.jboss.errai.bus.client.api

Examples of org.jboss.errai.bus.client.api.ResourceProvider


                bind(MessageBus.class).toInstance(context.getBus());
                bind(ServerMessageBus.class).toInstance(context.getBus());
              }
            }).getInstance(AuthenticationAdapter.class);

            config.getExtensionBindings().put(AuthenticationAdapter.class, new ResourceProvider() {
              public Object get() {
                return authAdapterInst;
              }
            });
          }
View Full Code Here


      final Class beanClass = type.getJavaClass();

      log.info("Register RPC Endpoint: " + type + "(" + rpcIntf + ")");

      // TODO: Copied from errai internals, refactor at some point
      createRPCScaffolding(rpcIntf, beanClass, bus, new ResourceProvider() {
        public Object get() {
          return Util.lookupRPCBean(beanManager, rpcIntf, beanClass);
        }
      });
    }
View Full Code Here

                                bind(MessageBus.class).toInstance(context.getBus());
                                bind(ServerMessageBus.class).toInstance(context.getBus());
                            }
                        }).getInstance(AuthenticationAdapter.class);

                        config.getExtensionBindings().put(AuthenticationAdapter.class, new ResourceProvider() {
                            public Object get() {
                                return authAdapterInst;
                            }
                        });
                    }
View Full Code Here

      ResourceProvider<Session> sessionProvider = new ResourceProvider<Session>() {
        public Session get() {
          return sessionFactory.openSession();
        }
      };
      ResourceProvider<SessionFactory> sessionFactoryProvider = new ResourceProvider() {
        public Object get() {
          return sessionFactory;
        }
      };

      final ModelAdapter hibenateAdapter = new HibernateAdapter(sessionFactory);
      ResourceProvider<ModelAdapter> modelAdapterProvider = new ResourceProvider<ModelAdapter>()
      {
        public ModelAdapter get()
        {
          return hibenateAdapter;
        }
      };
      logger.info("adding binding for: " + hibenateAdapter.getClass());
      config.addBinding(ModelAdapter.class, modelAdapterProvider);

      logger.info("adding binding for: " + sessionProvider.getClass());
      config.addBinding(Session.class, sessionProvider);

      logger.info("adding binding for: " + sessionFactoryProvider.getClass());
      config.addBinding(SessionFactory.class, sessionFactoryProvider);

      logger.info("adding resource provider for: " + sessionProvider.getClass());
      config.addResourceProvider("SessionProvider", sessionProvider);
    }
View Full Code Here

            final Class beanClass = type.getJavaClass();

            log.info("Register RPC Endpoint: " + type + "(" + rpcIntf + ")");

            // TODO: Copied from errai internals, refactor at some point
            createRPCScaffolding(rpcIntf, beanClass, bus, new ResourceProvider() {
                public Object get() {
                    return Util.lookupRPCBean(beanManager, rpcIntf, beanClass);
                }
            });
        }
View Full Code Here

                                bind(MessageBus.class).toInstance(context.getBus());
                                bind(ServerMessageBus.class).toInstance(context.getBus());
                            }
                        }).getInstance(AuthenticationAdapter.class);

                        config.getExtensionBindings().put(AuthenticationAdapter.class, new ResourceProvider() {
                            public Object get() {
                                return authAdapterInst;
                            }
                        });
                    }
View Full Code Here

                bind(MessageBus.class).toInstance(context.getBus());
                bind(ServerMessageBus.class).toInstance(context.getBus());
              }
            }).getInstance(AuthenticationAdapter.class);

            config.getExtensionBindings().put(AuthenticationAdapter.class, new ResourceProvider() {
              public Object get() {
                return authAdapterInst;
              }
            });
          }
View Full Code Here

TOP

Related Classes of org.jboss.errai.bus.client.api.ResourceProvider

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.