Search in sources :

Example 1 with Request

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;
}
Also used : BytesMap(com.tvd12.calabash.core.BytesMap) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Example 2 with Request

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;
}
Also used : BytesMap(com.tvd12.calabash.core.BytesMap) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Example 3 with Request

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;
}
Also used : BytesMap(com.tvd12.calabash.core.BytesMap) ArrayList(java.util.ArrayList) ByteArray(com.tvd12.calabash.core.util.ByteArray) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Example 4 with Request

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);
}
Also used : MessageChannel(com.tvd12.calabash.server.core.message.MessageChannel) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Example 5 with 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;
}
Also used : Author(com.tvd12.example.spring_boot_redis.entity.Author) PostMapping(org.springframework.web.bind.annotation.PostMapping)

Aggregations

Test (org.testng.annotations.Test)128 HttpServletResponse (javax.servlet.http.HttpServletResponse)48 HttpServletRequest (javax.servlet.http.HttpServletRequest)45 EzySession (com.tvd12.ezyfoxserver.entity.EzySession)37 BeforeTest (org.testng.annotations.BeforeTest)36 BaseTest (com.tvd12.test.base.BaseTest)31 EzyArray (com.tvd12.ezyfox.entity.EzyArray)30 ComponentManager (com.tvd12.ezyhttp.server.core.manager.ComponentManager)29 BlockingServlet (com.tvd12.ezyhttp.server.core.servlet.BlockingServlet)29 ToString (lombok.ToString)29 RequestURI (com.tvd12.ezyhttp.server.core.request.RequestURI)27 ServletOutputStream (javax.servlet.ServletOutputStream)25 EzyServerContext (com.tvd12.ezyfoxserver.context.EzyServerContext)24 RequestHandlerManager (com.tvd12.ezyhttp.server.core.manager.RequestHandlerManager)24 Cookie (javax.servlet.http.Cookie)24 HttpClientProxy (com.tvd12.ezyhttp.client.HttpClientProxy)22 RequestCookie (com.tvd12.ezyhttp.server.core.annotation.RequestCookie)22 EzyZoneContext (com.tvd12.ezyfoxserver.context.EzyZoneContext)21 HttpClient (com.tvd12.ezyhttp.client.HttpClient)21 PostRequest (com.tvd12.ezyhttp.client.request.PostRequest)21