public class ReactorPeerFactoryBean<IN,OUT>
extends java.lang.Object
implements org.springframework.beans.factory.FactoryBean<reactor.io.net.ReactorPeer<IN,OUT,?>>
Constructor and Description |
---|
ReactorPeerFactoryBean(reactor.Environment env,
java.lang.String transport,
java.util.Map<java.lang.String,reactor.io.codec.Codec> codecs) |
Modifier and Type | Method and Description |
---|---|
reactor.io.net.ReactorPeer<IN,OUT,?> |
getObject() |
java.lang.Class<?> |
getObjectType() |
boolean |
isSingleton() |
ReactorPeerFactoryBean<IN,OUT> |
setCodec(java.lang.String codec)
Set the type of
Codec to use to managing encoding and decoding of the data. |
ReactorPeerFactoryBean<IN,OUT> |
setDispatcher(reactor.core.Dispatcher dispatcher) |
ReactorPeerFactoryBean<IN,OUT> |
setDispatcher(java.lang.String dispatcher)
Set the name of the
Dispatcher to use, which will be pulled from the current Environment . |
ReactorPeerFactoryBean<IN,OUT> |
setFraming(java.lang.String framing)
Set the type of framing to use.
|
ReactorPeerFactoryBean<IN,OUT> |
setHost(java.lang.String host)
Set the host to which this server will bind.
|
ReactorPeerFactoryBean<IN,OUT> |
setLengthFieldLength(int lengthFieldLength)
Set the length of the length field if using length-field framing.
|
ReactorPeerFactoryBean<IN,OUT> |
setPort(int port)
Set the port to which this server will bind.
|
public ReactorPeerFactoryBean(reactor.Environment env, java.lang.String transport, java.util.Map<java.lang.String,reactor.io.codec.Codec> codecs)
public ReactorPeerFactoryBean<IN,OUT> setDispatcher(java.lang.String dispatcher)
Dispatcher
to use, which will be pulled from the current Environment
.dispatcher
- dispatcher namepublic ReactorPeerFactoryBean<IN,OUT> setDispatcher(reactor.core.Dispatcher dispatcher)
public ReactorPeerFactoryBean<IN,OUT> setHost(java.lang.String host)
host
- the host to bind to (defaults to 0.0.0.0
)public ReactorPeerFactoryBean<IN,OUT> setPort(int port)
port
- the port to bind to (defaults to 3000
)public ReactorPeerFactoryBean<IN,OUT> setCodec(java.lang.String codec)
Codec
to use to managing encoding and decoding of the data. The default options for codecs are:
bytes
- Use the standard byte array codec.string
- Use the standard String codec.syslog
- Use the standard Syslog codec.codec
- the codecpublic ReactorPeerFactoryBean<IN,OUT> setFraming(java.lang.String framing)
The options for framing are:
linefeed
- Means use an
LF-delimited linefeed codec.length
- Means use a length-field based codec where the initial
bytes of a message are the length of the rest of the message.framing
- type of framingpublic ReactorPeerFactoryBean<IN,OUT> setLengthFieldLength(int lengthFieldLength)
lengthFieldLength
- 2
for a short
, 4
for an int
(the default), or 8
for a long
public java.lang.Class<?> getObjectType()