Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
45 lines (34 sloc) 1.31 KB
// This autogenerated skeleton file illustrates how to build a server.
// You should copy it to another filename to avoid overwriting it.
#include "SpanReceiver.h"
#include <protocol/TBinaryProtocol.h>
#include <server/TSimpleServer.h>
#include <transport/TServerSocket.h>
#include <transport/TBufferTransports.h>
using namespace ::apache::thrift;
using namespace ::apache::thrift::protocol;
using namespace ::apache::thrift::transport;
using namespace ::apache::thrift::server;
using boost::shared_ptr;
using namespace accumulo::cloudtrace;
class SpanReceiverHandler : virtual public SpanReceiverIf {
SpanReceiverHandler() {
// Your initialization goes here
void span(const RemoteSpan& span) {
// Your implementation goes here
int main(int argc, char **argv) {
int port = 9090;
shared_ptr<SpanReceiverHandler> handler(new SpanReceiverHandler());
shared_ptr<TProcessor> processor(new SpanReceiverProcessor(handler));
shared_ptr<TServerTransport> serverTransport(new TServerSocket(port));
shared_ptr<TTransportFactory> transportFactory(new TBufferedTransportFactory());
shared_ptr<TProtocolFactory> protocolFactory(new TBinaryProtocolFactory());
TSimpleServer server(processor, serverTransport, transportFactory, protocolFactory);
return 0;