public ThriftCodecManager(ClassLoader parent, ThriftCodec<?>... codecs) { this(new CompilerThriftCodecFactory(parent), ImmutableSet.copyOf(codecs)); }
public CompilerThriftCodecFactory(boolean debug, ClassLoader parent) { this.debug = debug; this.classLoader = getPriviledgedClassLoader(parent); }
public ThriftCodecManager(ThriftCodec<?>... codecs) { this(new CompilerThriftCodecFactory(ThriftCodecManager.class.getClassLoader()), ImmutableSet.copyOf(codecs)); }
public CompilerThriftCodecFactory(boolean debug) { this(debug, getPriviledgedClassLoader(CompilerThriftCodecFactory.class.getClassLoader())); }
ThriftCodecManager codecManager = new ThriftCodecManager( new CompilerThriftCodecFactory(false) ); List<ThriftEventHandler> eventList = Collections.emptyList(); ThriftServiceProcessor proc = new ThriftServiceProcessor(codecManager, eventList, svc); this.multiplex.registerProcessor(name, NiftyProcessorAdapters.processorToTProcessor(proc));
protected void addProcessor(String name, Object svc) { ThriftCodecManager codecManager = new ThriftCodecManager( new CompilerThriftCodecFactory(false) ); List<ThriftEventHandler> eventList = Collections.emptyList(); ThriftServiceProcessor proc = new ThriftServiceProcessor(codecManager, eventList, svc); this.processors.put(name, proc); this.multiplex.registerProcessor(name, NiftyProcessorAdapters.processorToTProcessor(proc)); }
@Override public ThriftCodecManager createWriteCodecManager() { return new ThriftCodecManager(new CompilerThriftCodecFactory(true)); } }
@Override public ThriftCodecManager createReadCodecManager() { return new ThriftCodecManager(new CompilerThriftCodecFactory(true)); }