Search in sources :

Example 6 with Rpc

use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.

the class MapRequestController method mapClear.

@Rpc(Commands.MAP_CLEAR)
public boolean mapClear(MapClearRequest request) {
    BytesMap map = getBytesMap(request.getMapId());
    map.clear();
    return Boolean.TRUE;
}
Also used : BytesMap(com.tvd12.calabash.core.BytesMap) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Example 7 with Rpc

use of com.tvd12.quick.rpc.server.annotation.Rpc in project calabash by youngmonkeys.

the class MessageChannelRequestController method messageChannelPublish.

@Rpc(Commands.MESSGE_CHANNEL_SUBSCRIBE)
public boolean messageChannelPublish(MessageChannelSubscribeRequest request, RpcSession session) {
    MessageChannel messageChannel = getMessageChannel(request.getChannelId());
    messageChannel.addSubscriber(session);
    return Boolean.TRUE;
}
Also used : MessageChannel(com.tvd12.calabash.server.core.message.MessageChannel) Rpc(com.tvd12.quick.rpc.server.annotation.Rpc)

Aggregations

Rpc (com.tvd12.quick.rpc.server.annotation.Rpc)7 BytesMap (com.tvd12.calabash.core.BytesMap)5 MessageChannel (com.tvd12.calabash.server.core.message.MessageChannel)2 ByteArray (com.tvd12.calabash.core.util.ByteArray)1 ArrayList (java.util.ArrayList)1