public class Dispatcher extends Object implements Runnable, TimerNAF.TimeProvider, EntityReaper, Producer.Consumer<Object>
Modifier and Type | Class and Description |
---|---|
static class |
Dispatcher.STOPSTATUS |
public final long timeboot
public final String name
public boolean inThread()
public boolean isRunning()
public boolean isActive()
public void waitStopped()
public ApplicationContextNAF getApplicationContext()
public NafManAgent getAgent()
public ResolverDNS getResolverDNS()
public Flusher getFlusher()
public Logger getLogger()
public boolean completedOK()
public Thread start()
public boolean stop()
public Dispatcher.STOPSTATUS waitStopped(long timeout, boolean force)
public long getSystemTime()
getSystemTime
in interface TimerNAF.TimeProvider
public TimerNAF setTimer(long interval, int type, TimerNAF.Handler handler)
public TimerNAF setTimer(long interval, int type, TimerNAF.Handler handler, Object attachment)
public void producerIndication(Producer<Object> p) throws IOException
producerIndication
in interface Producer.Consumer<Object>
IOException
public void loadNaflet(Naflet app) throws IOException
IOException
public void unloadNaflet(String naflet_name) throws IOException
IOException
public void entityStopped(Object entity)
entityStopped
in interface EntityReaper
public void registerReaper(EntityReaper reaper)
public void cancelReaper(EntityReaper reaper)
public CharSequence dumpState(StringBuilder sb, boolean verbose)
public boolean killConnection(int id, long stime, String diag) throws IOException
IOException
public Naflet[] listNaflets()
public int transfer(ByteBuffer src, ByteBuffer dst)
public ByteBuffer allocNIOBuffer(int cap)
public byte[] allocMemBuffer(int cap)
public static Dispatcher create(ApplicationContextNAF appctx, DispatcherDef def, Logger log) throws IOException
IOException
public static List<Dispatcher> launchConfigured(ApplicationContextNAF appctx, Logger log) throws IOException
IOException
public static Dispatcher createConfigured(ApplicationContextNAF appctx, String dname, Logger log) throws IOException
IOException
public static String dumpConfig(ApplicationContextNAF appctx)
Copyright 2010-2018 Grey Software (Yusef Badri). All Rights Reserved.