com.tinkerpop.rexster.client.RexsterClientHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rexster-protocol Show documentation
Show all versions of rexster-protocol Show documentation
RexPro is a binary protocol for Rexster graph server.
package com.tinkerpop.rexster.client;
import com.tinkerpop.rexster.protocol.msg.RexProMessage;
import org.glassfish.grizzly.filterchain.BaseFilter;
import org.glassfish.grizzly.filterchain.FilterChainContext;
import org.glassfish.grizzly.filterchain.NextAction;
import java.io.IOException;
/**
* @author Stephen Mallette (http://stephen.genoprime.com)
*/
public class RexsterClientHandler extends BaseFilter {
private RexsterClient client;
public void setClient(final RexsterClient client) {
this.client = client;
}
public NextAction handleRead(FilterChainContext ctx) throws IOException {
try {
client.putResponse((RexProMessage) ctx.getMessage());
}
catch (Exception e) {
e.printStackTrace();
}
return ctx.getStopAction();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy