Class RedisClient

java.lang.Object
at.ac.ait.lablink.clients.redisclient.RedisClient

public class RedisClient
extends Object
Class RedisClient.
  • Field Details

  • Constructor Details

    • RedisClient

      public RedisClient()
    • RedisClient

      public RedisClient​(String redisIpAddress, int redisPort, String scenarioName, String groupName, String clientName, String clientDesc, String llprop, String llsync) throws at.ac.ait.lablink.core.client.ex.ClientNotReadyException, at.ac.ait.lablink.core.client.ex.CommInterfaceNotSupportedException, at.ac.ait.lablink.core.client.ex.DataTypeNotSupportedException, at.ac.ait.lablink.core.client.ex.NoServicesInClientLogicException, at.ac.ait.lablink.core.client.ex.NoSuchCommInterfaceException, at.ac.ait.lablink.core.client.ex.ServiceIsNotRegisteredWithClientException, at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType, org.apache.commons.configuration.ConfigurationException
      Constructor.
      Parameters:
      redisIpAddress - Redis IP address
      redisPort - Redis port
      scenarioName - scenario name
      groupName - group name
      clientName - client name
      clientDesc - client description
      llprop - Lablink properties
      llsync - Lablink sync properties
      Throws:
      at.ac.ait.lablink.core.client.ex.ClientNotReadyException - client not ready
      at.ac.ait.lablink.core.client.ex.CommInterfaceNotSupportedException - comm interface not supported
      at.ac.ait.lablink.core.client.ex.DataTypeNotSupportedException - data type not supported
      at.ac.ait.lablink.core.client.ex.NoServicesInClientLogicException - no services in client logic
      at.ac.ait.lablink.core.client.ex.NoSuchCommInterfaceException - no such comm interface
      at.ac.ait.lablink.core.client.ex.ServiceIsNotRegisteredWithClientException - service is not registered with client
      at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType - service type does not match client type
      org.apache.commons.configuration.ConfigurationException - configuration error
  • Method Details

    • addRedisKeyAsSensor

      public void addRedisKeyAsSensor​(String key, int msTimeInterval) throws at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType
      Add Redis key as sensor.
      Parameters:
      key - Redis key
      msTimeInterval - time interval in ms
      Throws:
      at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType - service type does not match client type exception
    • addRedisKeyAsActuator

      public void addRedisKeyAsActuator​(String key) throws at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType
      Add Redis key as actuator.
      Parameters:
      key - Redis key
      Throws:
      at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType - service type does not match client type exception
    • start

      public void start() throws at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType, at.ac.ait.lablink.core.client.ex.ClientNotReadyException, at.ac.ait.lablink.core.client.ex.NoSuchCommInterfaceException, org.apache.commons.configuration.ConfigurationException, at.ac.ait.lablink.core.client.ex.NoServicesInClientLogicException, at.ac.ait.lablink.core.client.ex.DataTypeNotSupportedException
      Start the client.
      Throws:
      at.ac.ait.lablink.core.client.ex.ServiceTypeDoesNotMatchClientType - service type does not match client type exception
      at.ac.ait.lablink.core.client.ex.ClientNotReadyException - client not ready exception
      at.ac.ait.lablink.core.client.ex.NoSuchCommInterfaceException - no such comm interface exception
      org.apache.commons.configuration.ConfigurationException - configuration exception
      at.ac.ait.lablink.core.client.ex.NoServicesInClientLogicException - no services in client logic exception
      at.ac.ait.lablink.core.client.ex.DataTypeNotSupportedException - data type not supported exception