use of com.tvd12.ezyhttp.client.request.Request in project calabash by youngmonkeys.
the class MapRequestController method mapRemoveMany.
@Rpc(Commands.MAP_REMOVE_MANY)
public boolean mapRemoveMany(MapRemoveManyRequest request) {
BytesMap map = getBytesMap(request.getMapId());
map.remove(request.getKeys());
return Boolean.TRUE;
}
use of com.tvd12.ezyhttp.client.request.Request in project calabash by youngmonkeys.
the class MapRequestController method mapSet.
@Rpc(Commands.MAP_SET)
public boolean mapSet(MapSetRequest request) {
BytesMap map = getBytesMap(request.getMapId());
map.set(request.getKey(), request.getValue());
return Boolean.TRUE;
}
use of com.tvd12.ezyhttp.client.request.Request in project calabash by youngmonkeys.
the class MapRequestController method mapGetMany.
@Rpc(Commands.MAP_GET_MANY)
public List<byte[]> mapGetMany(MapGetManyRequest request) {
BytesMap map = getBytesMap(request.getMapId());
List<ByteArray> keys = ByteArray.wrap(request.getKeys());
Map<ByteArray, byte[]> m = map.get(keys);
List<byte[]> answer = new ArrayList<>(keys.size());
for (ByteArray key : keys) {
answer.add(m.get(key));
}
return answer;
}
use of com.tvd12.ezyhttp.client.request.Request in project calabash by youngmonkeys.
the class MessageChannelRequestController method messageChannelPublish.
@Rpc(Commands.MESSAGE_CHANNEL_PUBLISH)
public void messageChannelPublish(MessageChannelPublishRequest request) {
MessageChannel messageChannel = getMessageChannel(request.getChannelId());
messageChannel.broadcast(request);
}
use of com.tvd12.ezyhttp.client.request.Request in project java-examples by tvd12.
the class AuthorController method addAuthor.
@PostMapping("/add")
public Author addAuthor(@RequestBody AddAuthorRequest request) {
Author author = new Author(idGentor.incrementAndGet("author"), request.getAuthorName());
authorRepository.save(author);
return author;
}
Aggregations