Class AbstractServiceUserHandler

  • All Implemented Interfaces:
    io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler
    Direct Known Subclasses:
    CltuServiceUserHandler, RacfServiceUserHandler

    public abstract class AbstractServiceUserHandler
    extends io.netty.channel.ChannelInboundHandlerAdapter
    Common class for all SLE services
    Author:
    nm
    • Method Detail

      • getVersionNumber

        public int getVersionNumber()
      • setVersionNumber

        public void setVersionNumber​(int versionNumber)
      • channelRead

        public void channelRead​(io.netty.channel.ChannelHandlerContext ctx,
                                Object msg)
        Specified by:
        channelRead in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRead in class io.netty.channel.ChannelInboundHandlerAdapter
      • getAuthLevel

        public AuthLevel getAuthLevel()
      • setAuthLevel

        public void setAuthLevel​(AuthLevel authLevel)
      • channelRegistered

        public void channelRegistered​(io.netty.channel.ChannelHandlerContext ctx)
                               throws Exception
        Specified by:
        channelRegistered in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelRegistered in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • channelActive

        public void channelActive​(io.netty.channel.ChannelHandlerContext ctx)
                           throws Exception
        Specified by:
        channelActive in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        channelActive in class io.netty.channel.ChannelInboundHandlerAdapter
        Throws:
        Exception
      • getParameter

        public abstract CompletableFuture<SleParameter> getParameter​(int parameterId)
        Get the value of an RAF parameter from the provider
        Parameters:
        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.
        Returns:
      • isConnected

        public boolean isConnected()
      • stop

        public CompletableFuture<Void> stop()
        request that the SLE service provider stop service provision and production.
        Returns:
      • schedulePeriodicStatusReport

        public CompletableFuture<Void> schedulePeriodicStatusReport​(int intervalSec)
        Send a request to the server to ask for a periodic status report.
        Parameters:
        intervalSec - - the cycle on which the periodic report shall be sent
        Returns:
      • stopPeriodicStatusReport

        public CompletableFuture<Void> stopPeriodicStatusReport()
        Send a request to stop the periodic status report.
        Returns:
      • shutdown

        public void shutdown()
      • checkUnbound

        protected void checkUnbound()
      • processBindInvocation

        protected void processBindInvocation​(SleBindInvocation bindInvocation)
      • processUnbindInvocation

        protected void processUnbindInvocation​(SleUnbindInvocation unbindInvocation)
      • peerAbort

        protected void peerAbort()
      • getNonBindCredentials

        protected Credentials getNonBindCredentials()
      • verifyNonBindCredentials

        protected void verifyNonBindCredentials​(Credentials credentials)
      • verifyBindCredentials

        protected void verifyBindCredentials​(Credentials credentials)
      • getInvokeId

        protected InvokeId getInvokeId()
      • changeState

        protected void changeState​(State newState)
      • exceptionCaught

        public void exceptionCaught​(io.netty.channel.ChannelHandlerContext ctx,
                                    Throwable cause)
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelHandler
        Specified by:
        exceptionCaught in interface io.netty.channel.ChannelInboundHandler
        Overrides:
        exceptionCaught in class io.netty.channel.ChannelInboundHandlerAdapter
      • notifyDisconnected

        protected void notifyDisconnected()
      • getState

        public State getState()