Exemple #1
0
  @Override
  protected void configure() {
    String baseUrl = "http://127.0.0.1:8888/";
    QueueService queueService = new QueueService(baseUrl);
    requestInjection(queueService);
    bind(QueueService.class).toInstance(queueService);

    InMemoryDataStore dataStore = new InMemoryDataStore();

    dataStore.map(Queue.getDefaultInstance(), "queue_id").withIndex("scope", "name");
    dataStore.map(Message.getDefaultInstance(), "queue_id", "message_id");

    bind(DataStore.class).toInstance(dataStore);
  }