Package io.riemann.riemann.client
Class UdpTransport
java.lang.Object
io.riemann.riemann.client.UdpTransport
- All Implemented Interfaces:
SynchronousTransport,Transport,AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic enum -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal AtomicBooleanio.netty.bootstrap.Bootstrapfinal io.netty.channel.group.ChannelGroupfinal AtomicLongstatic final intfinal io.netty.channel.EventLoopGroupfinal InetSocketAddressstatic final io.netty.handler.codec.protobuf.ProtobufEncoderfinal AtomicLongfinal InetSocketAddressfinal AtomicInteger -
Constructor Summary
ConstructorsConstructorDescriptionUdpTransport(int port) UdpTransport(String remoteHost) UdpTransport(String host, int port) UdpTransport(String remoteHost, int remotePort, String localHost, int localPort) UdpTransport(String remoteHost, String localHost) UdpTransport(InetSocketAddress remoteAddress) UdpTransport(InetSocketAddress remoteAddress, InetSocketAddress localAddress) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidclose(boolean force) voidconnect()voidflush()booleanvoidsendMessage(Proto.Msg msg) voidsetExceptionReporter(ExceptionReporter exceptionReporter)
-
Field Details
-
blackhole
-
pbEncoder
public static final io.netty.handler.codec.protobuf.ProtobufEncoder pbEncoder -
discardHandler
-
DEFAULT_PORT
public static final int DEFAULT_PORT- See Also:
-
state
-
bootstrap
public volatile io.netty.bootstrap.Bootstrap bootstrap -
eventLoopGroup
public final io.netty.channel.EventLoopGroup eventLoopGroup -
channels
public final io.netty.channel.group.ChannelGroup channels -
reconnectDelay
-
connectTimeout
-
sendBufferSize
-
autoFlush
-
remoteAddress
-
localAddress
-
exceptionReporter
-
-
Constructor Details
-
UdpTransport
-
UdpTransport
-
UdpTransport
- Throws:
IOException
-
UdpTransport
public UdpTransport(String remoteHost, int remotePort, String localHost, int localPort) throws IOException - Throws:
IOException
-
UdpTransport
- Throws:
IOException
-
UdpTransport
- Throws:
IOException
-
UdpTransport
- Throws:
IOException
-
-
Method Details
-
setExceptionReporter
-
isConnected
public boolean isConnected()- Specified by:
isConnectedin interfaceTransport
-
connect
- Specified by:
connectin interfaceTransport- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceTransport
-
close
public void close(boolean force) -
reconnect
- Specified by:
reconnectin interfaceTransport- Throws:
IOException
-
flush
- Specified by:
flushin interfaceTransport- Throws:
IOException
-
sendMessage
- Specified by:
sendMessagein interfaceSynchronousTransport
-
transport
-