Search in sources :

Example 1 with KeepAliveReply

use of me.semx11.autotip.api.reply.impl.KeepAliveReply in project Hyperium by HyperiumClient.

the class KeepAliveRequest method execute.

@Override
public KeepAliveReply execute() {
    HttpUriRequest request = GetBuilder.of(this).addParameter("key", sessionKey).build();
    Optional<Reply> optional = RequestHandler.getReply(this, request.getURI());
    return optional.map(reply -> (KeepAliveReply) reply).orElseGet(() -> new KeepAliveReply(false));
}
Also used : HttpUriRequest(org.apache.http.client.methods.HttpUriRequest) KeepAliveReply(me.semx11.autotip.api.reply.impl.KeepAliveReply) RequestHandler(me.semx11.autotip.api.RequestHandler) SessionKey(me.semx11.autotip.api.SessionKey) RequestType(me.semx11.autotip.api.RequestType) GetBuilder(me.semx11.autotip.api.GetBuilder) Reply(me.semx11.autotip.api.reply.Reply) Optional(java.util.Optional) HttpUriRequest(org.apache.http.client.methods.HttpUriRequest) Request(me.semx11.autotip.api.request.Request) KeepAliveReply(me.semx11.autotip.api.reply.impl.KeepAliveReply) Reply(me.semx11.autotip.api.reply.Reply) KeepAliveReply(me.semx11.autotip.api.reply.impl.KeepAliveReply)

Aggregations

Optional (java.util.Optional)1 GetBuilder (me.semx11.autotip.api.GetBuilder)1 RequestHandler (me.semx11.autotip.api.RequestHandler)1 RequestType (me.semx11.autotip.api.RequestType)1 SessionKey (me.semx11.autotip.api.SessionKey)1 Reply (me.semx11.autotip.api.reply.Reply)1 KeepAliveReply (me.semx11.autotip.api.reply.impl.KeepAliveReply)1 Request (me.semx11.autotip.api.request.Request)1 HttpUriRequest (org.apache.http.client.methods.HttpUriRequest)1