public abstract class AbstractServiceUserHandler
extends io.netty.channel.ChannelInboundHandlerAdapter
| Modifier and Type | Field and Description |
|---|---|
protected SleAttributes |
attr |
protected AuthLevel |
authLevel |
protected io.netty.channel.ChannelHandlerContext |
channelHandlerContext |
protected List<SleMonitor> |
monitors |
protected CompletableFuture<Void> |
startingCf |
protected State |
state |
| Constructor and Description |
|---|
AbstractServiceUserHandler(Isp1Authentication auth,
SleAttributes attr) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Void> |
bind()
Establish an association with the provider
|
protected void |
changeState(State newState) |
void |
channelActive(io.netty.channel.ChannelHandlerContext ctx) |
void |
channelRead(io.netty.channel.ChannelHandlerContext ctx,
Object msg) |
void |
channelRegistered(io.netty.channel.ChannelHandlerContext ctx) |
protected void |
checkUnbound() |
void |
exceptionCaught(io.netty.channel.ChannelHandlerContext ctx,
Throwable cause) |
protected abstract Constants.ApplicationIdentifier |
getApplicationIdentifier() |
AuthLevel |
getAuthLevel() |
protected <T> CompletableFuture<T> |
getFuture(InvokeId invokeId) |
protected InvokeId |
getInvokeId() |
protected InvokeId |
getInvokeId(CompletableFuture<?> cf) |
protected Credentials |
getNonBindCredentials() |
abstract CompletableFuture<SleParameter> |
getParameter(int parameterId)
Get the value of an RAF parameter from the provider
|
State |
getState() |
int |
getVersionNumber() |
boolean |
isConnected() |
protected void |
notifyDisconnected() |
protected void |
peerAbort() |
protected void |
processBindInvocation(SleBindInvocation bindInvocation) |
protected abstract void |
processData(com.beanit.jasn1.ber.BerTag berTag,
InputStream is) |
protected void |
processStopReturn(SleAcknowledgement stopReturn) |
protected void |
processUnbindInvocation(SleUnbindInvocation unbindInvocation) |
CompletableFuture<Void> |
schedulePeriodicStatusReport(int intervalSec)
Send a request to the server to ask for a periodic status report.
|
void |
setAuthLevel(AuthLevel authLevel) |
void |
setVersionNumber(int versionNumber) |
void |
shutdown()
Closes the SLE connection (does not send any unbind or stop first).
|
CompletableFuture<Void> |
stop()
request that the SLE service provider stop service provision and production.
|
CompletableFuture<Void> |
stopPeriodicStatusReport()
Send a request to stop the periodic status report.
|
CompletableFuture<Void> |
unbind(Constants.UnbindReason reason) |
protected void |
verifyBindCredentials(Credentials credentials) |
protected void |
verifyNonBindCredentials(Credentials credentials) |
channelInactive, channelReadComplete, channelUnregistered, channelWritabilityChanged, userEventTriggeredensureNotSharable, handlerAdded, handlerRemoved, isSharableprotected CompletableFuture<Void> startingCf
protected volatile State state
protected io.netty.channel.ChannelHandlerContext channelHandlerContext
protected AuthLevel authLevel
protected final SleAttributes attr
protected List<SleMonitor> monitors
public AbstractServiceUserHandler(Isp1Authentication auth, SleAttributes attr)
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 abstract CompletableFuture<SleParameter> getParameter(int parameterId)
parameterId - one of the parameters defined in Constants.ParameterName. Note that not all of them make sense for the
RAF, see the table 3-11 in the standard to see which ones make sense.public boolean isConnected()
public CompletableFuture<Void> bind()
public CompletableFuture<Void> stop()
public CompletableFuture<Void> unbind(Constants.UnbindReason reason)
public CompletableFuture<Void> schedulePeriodicStatusReport(int intervalSec)
intervalSec - - the cycle on which the periodic report shall be sentpublic CompletableFuture<Void> stopPeriodicStatusReport()
public void shutdown()
protected void checkUnbound()
protected void processBindInvocation(SleBindInvocation bindInvocation)
protected void processUnbindInvocation(SleUnbindInvocation unbindInvocation)
protected void processStopReturn(SleAcknowledgement stopReturn)
protected void peerAbort()
protected Credentials getNonBindCredentials()
protected void verifyNonBindCredentials(Credentials credentials)
protected void verifyBindCredentials(Credentials credentials)
protected InvokeId getInvokeId()
protected <T> CompletableFuture<T> getFuture(InvokeId invokeId)
protected void changeState(State newState)
protected InvokeId getInvokeId(CompletableFuture<?> cf)
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 State getState()
protected abstract Constants.ApplicationIdentifier getApplicationIdentifier()
protected abstract void processData(com.beanit.jasn1.ber.BerTag berTag,
InputStream is)
throws IOException
IOExceptionCopyright © 2022 Space Applications Services. All rights reserved.