public class NetconfStreamThread extends Thread implements NetconfStreamHandler
| Modifier and Type | Class and Description |
|---|---|
static class |
NetconfStreamThread.NetconfMessageState |
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
NetconfStreamThread(InputStream in,
OutputStream out,
InputStream err,
NetconfDeviceInfo deviceInfo,
NetconfSessionDelegate delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addDeviceEventListener(NetconfDeviceOutputEventListener listener)
Adds a listener for netconf events on the handled stream.
|
void |
removeDeviceEventListener(NetconfDeviceOutputEventListener listener)
Removes a listener for netconf events on the handled stream.
|
void |
run() |
CompletableFuture<String> |
sendMessage(String request)
Sends the request on the stream that is used to communicate to and from the device.
|
void |
setEnableNotifications(boolean enableNotifications) |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic NetconfStreamThread(InputStream in, OutputStream out, InputStream err, NetconfDeviceInfo deviceInfo, NetconfSessionDelegate delegate)
public CompletableFuture<String> sendMessage(String request)
NetconfStreamHandlersendMessage in interface NetconfStreamHandlerrequest - request to send to the physical devicepublic void addDeviceEventListener(NetconfDeviceOutputEventListener listener)
NetconfStreamHandleraddDeviceEventListener in interface NetconfStreamHandlerlistener - Netconf device event listenerpublic void removeDeviceEventListener(NetconfDeviceOutputEventListener listener)
NetconfStreamHandlerremoveDeviceEventListener in interface NetconfStreamHandlerlistener - Netconf device event listenerpublic void setEnableNotifications(boolean enableNotifications)
setEnableNotifications in interface NetconfStreamHandler