Class SuperpeerClientAgent

    • Field Detail

      • POLLING_RATE

        public static final double POLLING_RATE
        The fallback polling search rate as factor of the default remote timeout.
        See Also:
        Constant Field Values
      • pollingrate

        protected double pollingrate
        The fallback polling search rate as factor of the default timeout.
      • contimeout

        protected double contimeout
        The the connection timeout as factor of the default timeout.
      • awaonly

        protected boolean awaonly
        Use only awareness for remote search, i.e. no superpeers at all.
      • debugservices

        protected java.lang.Object debugservices
        Debug connection issues of polling mode for any of the named services (boolean or string with comma separated unqualified service interface names).
    • Constructor Detail

      • SuperpeerClientAgent

        public SuperpeerClientAgent()
    • Method Detail

      • init

        protected IFuture<java.lang.Void> init()
        Find and connect to super peers.
      • shutdown

        protected void shutdown()
        Close all connections on shutdown.
      • addQuery

        public <T> ISubscriptionIntermediateFuture<T> addQuery​(ServiceQuery<T> query)
        Add a service query. Continuously searches for matching services using available remote information sources.
        Specified by:
        addQuery in interface ISearchQueryManagerService
        Parameters:
        query - The search query.
        Returns:
        Future providing the corresponding services as intermediate results.
      • adjustConnectionTimeout

        protected void adjustConnectionTimeout()
        Set the connection timeout before calling a subscription service on the super peer. Called before registerClient() and addQuery().
      • getQueryNetworks

        protected java.lang.String[] getQueryNetworks​(ServiceQuery<?> query)
        Gets the networks relevant to the query.
        Parameters:
        query - The query.
        Returns:
        The relevant networks, may be empty for none.
      • debug

        protected boolean debug​(ServiceQuery<?> query)
        Check if a query should be debugged.