Class CLightningPlugin

    • Field Detail

      • parameters

        protected java.util.Map<java.lang.String,​java.lang.Object> parameters
    • Constructor Detail

      • CLightningPlugin

        public CLightningPlugin()
    • Method Detail

      • setParametersReady

        public void setParametersReady​(boolean parametersReady)
      • log

        public void log​(PluginLog level,
                        java.lang.String logMessage)
        This call should be enable also in RPC methods.
        Specified by:
        log in interface ICLightningPlugin
        Parameters:
        level - level log, this class should be an instance of enum CLightningLevelLog
        logMessage - log message should be the log message
      • addNotification

        public void addNotification​(java.lang.String methodName)
        Method to help the user to register a custom notification for the plugin
        Parameters:
        methodName - : A unique key to identify notification in the plugin
      • containsNotification

        public boolean containsNotification​(java.lang.String methodName)
        Helper method to check if a notification with the key (method name) exist in the plugin.
        Parameters:
        methodName - A unique key to identify notification in the plugin
        Returns:
        true if the plugin contains a notification with the key (methodName), false otherwise.
      • sendNotification

        public void sendNotification​(java.lang.String methodName,
                                     CLightningJsonObject params)
        Method to tell the plugin that the user want send a notification
        Parameters:
        methodName - : A unique key to identify notification in the plugin
        params - : A json object (CLightningJsonObject) that contains all the parameters that the notification need to ship.
      • initPreHandlerInterceptor

        protected void initPreHandlerInterceptor()
      • initPostHandlerInterceptor

        protected void initPostHandlerInterceptor()
      • registerMethod

        protected void registerMethod()
      • addSubscription

        public void addSubscription​(java.lang.String event)
      • addParameter

        public void addParameter​(java.lang.String key,
                                 java.lang.Object value)
        Specified by:
        addParameter in interface ICLightningPlugin
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object