public class SleProvider
extends io.netty.channel.ChannelInboundHandlerAdapter
It implements SLE BIND and UNBIND operations and also takes over the schedule reports activation/deactivation.
When BIND is called, it relies first on the AuthProvider to obtain user/name passwords information for the
new connection and then on the ServiceInitializer for obtaining a SleService.
It then it forwards all the subsequent operations to the newly obtained service.
In order to use it
AuthProvider that provides authentication dataServiceInitializer which based on some configuration creates one of the
CltuServiceProvider or RafServiceProvider (or maybe others in the future).
CltuUplinker which uplinks the CLTUsFrameDownlinker which provides telemetry frames
See the SleUdpBridge for an example on how this class is used to create a SLE to UDP bridge.
| Modifier and Type | Field and Description |
|---|---|
protected AuthLevel |
authLevel |
protected io.netty.channel.ChannelHandlerContext |
channelHandlerContext |
protected List<SleMonitor> |
monitors |
protected CompletableFuture<Void> |
startingCf |
| Constructor and Description |
|---|
SleProvider(AuthProvider authProvider,
String responderId,
ServiceInitializer serviceInitializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addMonitor(SleMonitor monitor)
Add a monitor to be notified when events happen.
|
protected void |
changeState(State newState) |
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelInactive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
AuthLevel |
getAuthLevel() |
protected Credentials |
getBindCredentials() |
protected InvokeId |
getInvokeId() |
protected Credentials |
getNonBindCredentials() |
int |
getVersionNumber() |
boolean |
isConnected() |
boolean |
isWritable()
Checks if the netty outgoing buffer is full.
|
protected void |
notifyDisconnected() |
protected void |
peerAbort() |
protected void |
processBindInvocation(SleBindInvocation bindInvocation) |
protected void |
processSleScheduleStatusReportInvocation(SleScheduleStatusReportInvocation sleScheduleStatusReportInvocation) |
protected void |
processUnbindInvocation(SleUnbindInvocation unbindInvocation) |
void |
removeMonitor(SleMonitor monitor) |
void |
sendMessage(com.beanit.jasn1.ber.types.BerType msg) |
void |
setAuthLevel(AuthLevel authLevel) |
void |
setVersionNumber(int versionNumber) |
void |
shutdown() |
protected void |
verifyBindCredentials(Credentials credentials) |
protected void |
verifyNonBindCredentials(Credentials credentials) |
channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected CompletableFuture<Void> startingCf
protected io.netty.channel.ChannelHandlerContext channelHandlerContext
protected AuthLevel authLevel
protected List<SleMonitor> monitors
public SleProvider(AuthProvider authProvider, String responderId, ServiceInitializer serviceInitializer)
public int getVersionNumber()
public void setVersionNumber(int versionNumber)
public void channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg)
channelRead in interface io.netty.channel.ChannelInboundHandlerchannelRead in class io.netty.channel.ChannelInboundHandlerAdapterpublic AuthLevel getAuthLevel()
public void setAuthLevel(AuthLevel authLevel)
public void channelRegistered(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelRegistered in interface io.netty.channel.ChannelInboundHandlerchannelRegistered in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void channelActive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelActive in interface io.netty.channel.ChannelInboundHandlerchannelActive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic boolean isConnected()
public void shutdown()
protected void processBindInvocation(SleBindInvocation bindInvocation)
protected void processUnbindInvocation(SleUnbindInvocation unbindInvocation)
protected void processSleScheduleStatusReportInvocation(SleScheduleStatusReportInvocation sleScheduleStatusReportInvocation)
protected void peerAbort()
protected Credentials getNonBindCredentials()
protected Credentials getBindCredentials()
protected void verifyNonBindCredentials(Credentials credentials)
protected void verifyBindCredentials(Credentials credentials)
protected InvokeId getInvokeId()
protected void changeState(State newState)
public void exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause)
exceptionCaught in interface io.netty.channel.ChannelHandlerexceptionCaught in interface io.netty.channel.ChannelInboundHandlerexceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapterprotected void notifyDisconnected()
public void channelInactive(io.netty.channel.ChannelHandlerContext ctx)
throws Exception
channelInactive in interface io.netty.channel.ChannelInboundHandlerchannelInactive in class io.netty.channel.ChannelInboundHandlerAdapterExceptionpublic void addMonitor(SleMonitor monitor)
monitor - public void removeMonitor(SleMonitor monitor)
public void sendMessage(com.beanit.jasn1.ber.types.BerType msg)
public boolean isWritable()
The onlineTimely RAF service should drop messages if the buffer is full.
The offline RAF service should back pressure the producer.
Note that even if the buffer is full, Netty will accept messages sent with sendMessage(BerType).
If the connection is completely stuck, the ISP1 heartbeat should detect the condition and close it.
Copyright © 2022 Space Applications Services. All rights reserved.