Package net.sf.eBus.config
Class EConfigure.AbstractConfig
- java.lang.Object
-
- net.sf.eBus.config.EConfigure.AbstractConfig
-
- Direct Known Subclasses:
EConfigure.RemoteConnection,EConfigure.Service
- Enclosing class:
- EConfigure
public abstract static class EConfigure.AbstractConfig extends Object
Base class for service and remote connections. Contains those data members common to both.
-
-
Field Summary
Fields Modifier and Type Field Description protected ByteOrdermByteOrderThe input and output buffer use this byte ordering.protected booleanmCanPauseSet totrueif accepted connections may be paused.protected EConfigure.ConnectionTypemConnectionTypeThe connections are of this type.protected DurationmHbDelaySend a heartbeat this many milliseconds after the last received input.protected DurationmHbReplyDelayWait this many milliseconds for a heartbeat reply.protected intmInputBufferSizeInput buffer size.protected intmMsgQueueSizeMaximum message queue size.protected StringmNameeBus local name.protected intmOutputBufferSizeOutput buffer size.protected EConfigure.PauseConfigmPauseConfigIfmCanPauseistrue, then the pause configuration is defined.protected SSLContextmSSLContextIfmConnectionTypeisEConfigure.ConnectionType.SECURE_TCP, then this is the SSL context used to secure the connection.
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractConfig(EConfigure.AbstractBuilder<?> builder)Constructs the common information for service and remote connections.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteOrderbyteOrder()Returns connection buffer byte ordering.booleancanPause()Returnstrueif pause requests are accepted andfalseif not.EConfigure.ConnectionTypeconnectionType()Returns the channel type.DurationheartbeatDelay()Returns the heartbeat delay in milliseconds.DurationheartbeatReplyDelay()Returns the heartbeat reply delay.intinputBufferSize()Returns the connection input buffer size.intmessageQueueSize()Returns the maximum number of messages on the output queue.Stringname()Returns the remote connection unique name.intoutputBufferSize()Returns the connection output buffer size.EConfigure.PauseConfigpauseConfiguration()Returns the connection pause configuration.SSLContextsslContext()Returns the SSL context used for a secure connection type.
-
-
-
Field Detail
-
mName
protected final String mName
eBus local name.
-
mConnectionType
protected final EConfigure.ConnectionType mConnectionType
The connections are of this type.
-
mInputBufferSize
protected final int mInputBufferSize
Input buffer size.
-
mOutputBufferSize
protected final int mOutputBufferSize
Output buffer size.
-
mByteOrder
protected final ByteOrder mByteOrder
The input and output buffer use this byte ordering.
-
mMsgQueueSize
protected final int mMsgQueueSize
Maximum message queue size.
-
mHbDelay
protected final Duration mHbDelay
Send a heartbeat this many milliseconds after the last received input. A zero value means heartbeating is not performed.
-
mHbReplyDelay
protected final Duration mHbReplyDelay
Wait this many milliseconds for a heartbeat reply. This timer is reset when a non-heartbeat reply is received. A zero value means an indefinite reply time.
-
mSSLContext
protected final SSLContext mSSLContext
IfmConnectionTypeisEConfigure.ConnectionType.SECURE_TCP, then this is the SSL context used to secure the connection.
-
mCanPause
protected final boolean mCanPause
Set totrueif accepted connections may be paused.
-
mPauseConfig
protected final EConfigure.PauseConfig mPauseConfig
-
-
Constructor Detail
-
AbstractConfig
protected AbstractConfig(EConfigure.AbstractBuilder<?> builder)
Constructs the common information for service and remote connections.- Parameters:
builder- connection builder.
-
-
Method Detail
-
name
public final String name()
Returns the remote connection unique name.- Returns:
- the remote connection unique name.
-
connectionType
public final EConfigure.ConnectionType connectionType()
Returns the channel type. This is currently limited to plain text TCP and SSL/TLS secure TCP connections.- Returns:
- connection type.
-
inputBufferSize
public final int inputBufferSize()
Returns the connection input buffer size.- Returns:
- the connection input buffer size.
-
outputBufferSize
public final int outputBufferSize()
Returns the connection output buffer size.- Returns:
- the connection output buffer size.
-
byteOrder
public final ByteOrder byteOrder()
Returns connection buffer byte ordering.- Returns:
- the connection buffer byte ordering.
-
messageQueueSize
public final int messageQueueSize()
Returns the maximum number of messages on the output queue. Returns zero if there is no limit.- Returns:
- the message queue maximum size.
-
heartbeatDelay
public final Duration heartbeatDelay()
Returns the heartbeat delay in milliseconds. A zero value means that heartbeating is not performed.- Returns:
- the heartbeat delay in milliseconds.
-
heartbeatReplyDelay
public final Duration heartbeatReplyDelay()
Returns the heartbeat reply delay. A zero value means an indefinite delay.- Returns:
- the heartbeat reply delay.
-
sslContext
public final SSLContext sslContext()
Returns the SSL context used for a secure connection type. Returnsnullif connection type is notEConfigure.ConnectionType.SECURE_TCP.- Returns:
- SSL context. May return
null.
-
canPause
public final boolean canPause()
Returnstrueif pause requests are accepted andfalseif not.- Returns:
trueif accepted connections may be paused.
-
pauseConfiguration
public final EConfigure.PauseConfig pauseConfiguration()
- Returns:
- connection pause configuration.
-
-