Class ClientContextImpl

    • Field Detail

      • VERSION

        public static final Version VERSION
        Version.
      • logger

        protected Logger logger
        Context logger.
      • debugLevel

        protected int debugLevel
        Debug level.
      • addressList

        protected String addressList
        A space-separated list of broadcast address for process variable name resolution. Each address must be of the form: ip.number:port or host.name:port
      • autoAddressList

        protected boolean autoAddressList
        Define whether or not the network interfaces should be discovered at runtime.
      • connectionTimeout

        protected float connectionTimeout
        If the context doesn't see a beacon from a server that it is connected to for connectionTimeout seconds then a state-of-health message is sent to the server over TCP/IP. If this state-of-health message isn't promptly replied to then the context will assume that the server is no longer present on the network and disconnect.
      • beaconPeriod

        protected float beaconPeriod
        Period in second between two beacon signals.
      • broadcastPort

        protected int broadcastPort
        Broadcast (beacon, search) port number to listen to.
      • receiveBufferSize

        protected int receiveBufferSize
        Receive buffer size (max size of payload).
      • timer

        protected org.epics.pvdata.misc.Timer timer
        Timer.
      • broadcastTransport

        protected BlockingUDPTransport broadcastTransport
        Broadcast transport needed to listen for broadcasts.
      • searchTransport

        protected BlockingUDPTransport searchTransport
        UDP transport needed for channel searches.
      • localBroadcastAddress

        protected InetSocketAddress localBroadcastAddress
        Local multicast address.
      • transportRegistry

        protected TransportRegistry transportRegistry
        PVA transport (virtual circuit) registry. This registry contains all active transports - connections to PVA servers.
      • channelsByCID

        protected final Map<Integer,​Channel> channelsByCID
        Map of channels (keys are CIDs).
      • pendingResponseRequests

        protected final Map<Integer,​ResponseRequest> pendingResponseRequests
        Map of pending response requests (keys are IOID).
      • channelProvider

        protected ChannelProvider channelProvider
        Provider implementation.
    • Constructor Detail

      • ClientContextImpl

        public ClientContextImpl()
        Constructor.
    • Method Detail

      • getVersion

        public Version getVersion()
      • initializeLogger

        protected void initializeLogger()
        Initialize context logger.
      • getConfiguration

        public Configuration getConfiguration()
        Get configuration instance.
        Returns:
        the configuration.
      • loadConfiguration

        protected void loadConfiguration()
        Load configuration.
      • destroy

        public void destroy()
      • getChannel

        public ChannelImpl getChannel​(int channelID)
        Searches for a channel with given channel ID.
        Parameters:
        channelID - CID.
        Returns:
        channel with given CID, null if non-existent.
      • printInfo

        public void printInfo()
      • printInfo

        public void printInfo​(PrintStream out)
      • isInitialized

        public boolean isInitialized()
        Get initialization status.
        Returns:
        initialization status.
      • isDestroyed

        public boolean isDestroyed()
        Get destruction status.
        Returns:
        destruction status.
      • getAddressList

        public String getAddressList()
        Get search address list.
        Returns:
        get search address list.
      • isAutoAddressList

        public boolean isAutoAddressList()
        Get auto search-list flag.
        Returns:
        auto search-list flag.
      • getBeaconPeriod

        public float getBeaconPeriod()
        Get beacon period (in seconds).
        Returns:
        beacon period (in seconds).
      • getConnectionTimeout

        public float getConnectionTimeout()
        Get connection timeout (in seconds).
        Returns:
        connection timeout (in seconds).
      • getDebugLevel

        public int getDebugLevel()
        Description copied from interface: Context
        Get internal debug level configuration, higher value means more, 0 means none.
        Specified by:
        getDebugLevel in interface Context
        Returns:
        debug level.
      • getReceiveBufferSize

        public int getReceiveBufferSize()
        Get receive buffer size (max size of payload).
        Returns:
        receive buffer size (max size of payload).
      • getBroadcastPort

        public int getBroadcastPort()
        Get broadcast port.
        Returns:
        broadcast port.
      • dispose

        public void dispose()
      • getBroadcastTransport

        public BlockingUDPTransport getBroadcastTransport()
        Broadcast transport.
        Returns:
        broadcast transport.
      • getSearchTransport

        public BlockingUDPTransport getSearchTransport()
        Broadcast transport.
        Returns:
        broadcast transport.
      • getLocalMulticastAddress

        public InetSocketAddress getLocalMulticastAddress()
        Get local multicast address (group).
        Returns:
        the address.
      • getTransportRegistry

        public TransportRegistry getTransportRegistry()
        Get PVA transport (virtual circuit) registry.
        Specified by:
        getTransportRegistry in interface Context
        Returns:
        PVA transport (virtual circuit) registry.
      • getTimer

        public org.epics.pvdata.misc.Timer getTimer()
        Get timer.
        Specified by:
        getTimer in interface Context
        Returns:
        timer.
      • getChannelSearchManager

        public ChannelSearchManager getChannelSearchManager()
        Get channel search manager.
        Returns:
        channel search manager.
      • newServerDetected

        public void newServerDetected()
        Called each time new server is detected.
      • getResponseRequest

        public ResponseRequest getResponseRequest​(int ioid)
        Searches for a response request with given channel IOID.
        Parameters:
        ioid - I/O ID.
        Returns:
        request response with given I/O ID.
      • registerResponseRequest

        public int registerResponseRequest​(ResponseRequest request)
        Register response request.
        Parameters:
        request - request to register.
        Returns:
        request ID (IOID).
      • unregisterResponseRequest

        public ResponseRequest unregisterResponseRequest​(ResponseRequest request)
        Unregister response request.
        Parameters:
        request - request to unregister.
        Returns:
        removed object, can be null
      • getBeaconHandler

        public BeaconHandler getBeaconHandler​(String protocol,
                                              InetSocketAddress responseFrom)
        Get (and if necessary create) beacon handler.
        Parameters:
        protocol - protocol used.
        responseFrom - remote source address of received beacon.
        Returns:
        beacon handler for particular server.