Class ServerChannelImpl

  • All Implemented Interfaces:
    ServerChannel

    public class ServerChannelImpl
    extends Object
    implements ServerChannel
    Server channel (client connection to local channel). This (default) implementation grants all access rights.
    Version:
    $Id$
    Author:
    Matej Sekoranja
    • Field Detail

      • channel

        protected final Channel channel
        Local channel.
      • sid

        protected final int sid
        Channel SID.
      • cid

        protected final int cid
        Channel CID.
      • requests

        protected final Map<Integer,​org.epics.pvdata.misc.Destroyable> requests
        Requests.
      • destroyed

        protected boolean destroyed
        Destroy state.
    • Constructor Detail

      • ServerChannelImpl

        public ServerChannelImpl​(Channel channel,
                                 int cid,
                                 int sid,
                                 SecurityPlugin.ChannelSecuritySession css)
        Create server channel for given process variable.
        Parameters:
        channel - local channel.
        cid - channel CID.
        sid - channel SID.
        css - channel security session.
    • Method Detail

      • getCID

        public int getCID()
        Get channel CID.
        Returns:
        channel CID.
      • getSID

        public int getSID()
        Description copied from interface: ServerChannel
        Get channel SID.
        Specified by:
        getSID in interface ServerChannel
        Returns:
        channel SID.
      • registerRequest

        public void registerRequest​(int id,
                                    org.epics.pvdata.misc.Destroyable request)
        Register request
        Parameters:
        id - request ID.
        request - request to be registered.
      • unregisterRequest

        public void unregisterRequest​(int id)
        Unregister request.
        Parameters:
        id - request ID.
      • getRequest

        public org.epics.pvdata.misc.Destroyable getRequest​(int id)
        Get request by its ID.
        Parameters:
        id - request ID.
        Returns:
        request with given ID, null if there is no request with such ID.
      • getRequests

        public org.epics.pvdata.misc.Destroyable[] getRequests()
        Specified by:
        getRequests in interface ServerChannel
      • destroyAllRequests

        protected void destroyAllRequests()
        Destroy all registered requests.
      • destroy

        public void destroy()
        Description copied from interface: ServerChannel
        Destroy server channel. This method MUST BE called if overriden.
        Specified by:
        destroy in interface ServerChannel
      • printInfo

        public void printInfo()
                       throws IllegalStateException
        Prints detailed information about the process variable to the standard output stream.
        Throws:
        IllegalStateException - if the context has been destroyed.
      • printInfo

        public void printInfo​(PrintStream out)
        Prints detailed information about the process variable to the specified output stream.
        Parameters:
        out - the output stream.
        Throws:
        IllegalStateException - if the context has been destroyed.