当前位置: 首页>>代码示例>>Java>>正文


Java Descriptor类代码示例

本文整理汇总了Java中com.lightbend.lagom.javadsl.api.Descriptor的典型用法代码示例。如果您正苦于以下问题:Java Descriptor类的具体用法?Java Descriptor怎么用?Java Descriptor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Descriptor类属于com.lightbend.lagom.javadsl.api包,在下文中一共展示了Descriptor类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    // @formatter:off
    return named("shippingService").with(
        restCall(Method.POST, "/api/itinerary", createItinerary()).withAutoAcl(true),
        restCall(Method.POST, "/api/itinerary/:itinerary/leg", addLeg()).withAutoAcl(true)
    );
    // @formatter:on

    /*
   {
         "leg": {
             "id": "1",
             "cargoId": "cargoId",
             "location": "derp",
             "arrivalTime": "2002-05-30T09:30:10Z",
             "departureTime": "2002-05-30T010:30:10Z"
         }
    }
     */
}
 
开发者ID:lagom,项目名称:activator-lagom-cargotracker,代码行数:22,代码来源:ShippingService.java

示例2: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    // @formatter:off
    return named("basket-service").withCalls(
            restCall(Method.POST, "/api/basket/:id/items", this::addItem),
            restCall(Method.DELETE, "/api/basket/:id/items", this::deleteItem),
            pathCall("/api/basket/:id", this::getBasket)
    ).publishing(
            topic("hello-events", this::basketEvents)
                    .withProperty(KafkaProperties.partitionKeyStrategy(), BasketEvent::getId)
    ).withPathParamSerializer(UUID.class, PathParamSerializers.required("UUID", UUID::fromString, UUID::toString)
    ).withAutoAcl(true);
    // @formatter:on
}
 
开发者ID:ignasi35,项目名称:lagom-java-workshop,代码行数:15,代码来源:BasketService.java

示例3: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("inventory-service").withCalls(
      pathCall("/api/warehouse/:id/items",  this::provisionItems)
    ).publishing(
      topic("inventory-events", this::inventoryEvents)
        .withProperty(KafkaProperties.partitionKeyStrategy(), InventoryEvent::getName)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:ignasi35,项目名称:lagom-java-workshop,代码行数:12,代码来源:InventoryService.java

示例4: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("hello").withCalls(
      pathCall("/api/hello/:id",  this::hello),
      pathCall("/api/hello/:id", this::useGreeting)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:MarioAriasC,项目名称:lagomkotlin,代码行数:10,代码来源:HelloService.java

示例5: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("chirpservice").withCalls(
      pathCall("/api/chirps/live/:userId", this::addChirp),
      namedCall("/api/chirps/live", this::getLiveChirps),
      namedCall("/api/chirps/history", this::getHistoricalChirps)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:11,代码来源:ChirpService.java

示例6: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("/loadtestservice").withCalls(
      namedCall("/load", this::startLoad),
      namedCall("/loadHeadless", this::startLoadHeadless)
    );
  // @formatter:on
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:10,代码来源:LoadTestService.java

示例7: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("activityservice").withCalls(
      pathCall("/api/activity/:userId/live", this::getLiveActivityStream),
      pathCall("/api/activity/:userId/history", this::getHistoricalActivityStream)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:10,代码来源:ActivityStreamService.java

示例8: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("friendservice").withCalls(
      pathCall("/api/users/:userId", this::getUser),
      namedCall("/api/users", this::createUser),
      pathCall("/api/users/:userId/friends", this::addFriend),
      pathCall("/api/users/:userId/followers", this::getFollowers)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:lagom,项目名称:lagom-java-chirper-example,代码行数:12,代码来源:FriendService.java

示例9: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    // @formatter:off
    return named("registrationService").with(
            restCall(Method.POST, "/api/registration", register()),
            pathCall("/api/registration/live", getLiveRegistrations()),
            restCall(Method.GET, "/api/registration/all", getAllRegistrations()),
            restCall(Method.GET, "/api/registration/:id", getRegistration())
    ).withAutoAcl(true);
    // @formatter:on
}
 
开发者ID:lagom,项目名称:activator-lagom-cargotracker,代码行数:12,代码来源:RegistrationService.java

示例10: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  // @formatter:off
  return named("chirpservice").withCalls(
      pathCall("/api/chirps/live/:userId", this::addChirp),
      pathCall("/api/chirps/live/:userId", this::getLiveChirps),
      namedCall("/api/chirps/history", this::getHistoricalChirps)
    ).withAutoAcl(true);
  // @formatter:on
}
 
开发者ID:negokaz,项目名称:lagom-hands-on-development,代码行数:11,代码来源:ChirpService.java

示例11: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    // @formatter:off
    return named("favoriteservice").withCalls(
            pathCall("/api/favorites/:userId/add", this::addFavorite),
            pathCall("/api/favorites/:userId/delete", this::deleteFavorite),
            pathCall("/api/favorites/:userId/list", this::getFavorites),
            pathCall("/api/favors/:favoriteId/count", this::getFavorCount)
    ).withAutoAcl(true);
    // @formatter:on
}
 
开发者ID:negokaz,项目名称:lagom-hands-on-development,代码行数:12,代码来源:FavoriteService.java

示例12: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    return named("blog").withCalls(
            restCall(Method.GET, "/api/blog/:id", this::getPost),
            restCall(Method.POST, "/api/blog/", this::addPost),
            restCall(Method.PUT, "/api/blog/:id", this::updatePost)
    ).withAutoAcl(true);
}
 
开发者ID:jvz,项目名称:lagom-example,代码行数:9,代码来源:BlogService.java

示例13: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    // @formatter:off
return named("hello").withCalls(
    pathCall("/api/hello/:id",  this::hello),
    pathCall("/api/hello/:id", this::useGreeting)
  ).withAutoAcl(true);
// @formatter:on
}
 
开发者ID:jvz,项目名称:lagom-example,代码行数:10,代码来源:HelloService.java

示例14: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
  return named("stream").withCalls(namedCall("stream", this::stream))
    .withAutoAcl(true);
}
 
开发者ID:MarioAriasC,项目名称:lagomkotlin,代码行数:6,代码来源:StreamService.java

示例15: descriptor

import com.lightbend.lagom.javadsl.api.Descriptor; //导入依赖的package包/类
@Override
default Descriptor descriptor() {
    return named("stream").withCalls(namedCall("stream", this::stream))
            .withAutoAcl(true);
}
 
开发者ID:jvz,项目名称:lagom-example,代码行数:6,代码来源:StreamService.java


注:本文中的com.lightbend.lagom.javadsl.api.Descriptor类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。