Skip navigation links
gu.sql2java

Class InterfaceContainer<I>

    • Field Summary

      Fields 
      Modifier and Type Field and Description
      I container
      接口容器实例
    • Constructor Summary

      Constructors 
      Constructor and Description
      InterfaceContainer(java.lang.Class<I> interfaceClass) 
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void register(I listener)
      将接口实例加入容器
      InterfaceContainer<I> setLogOnError(boolean logOnError)
      设置当执行容器中的接口实例有异常抛出时是否日志输出(仅当skipOnError为true时有效)
      InterfaceContainer<I> setSkipOnError(boolean skipOnError)
      设置当执行容器中的接口实例有异常抛出时的动作
      true时跳过继续执行下一个容器
      false时抛出异常
      void unregister(I listener)
      从容器中删除指定的接口实例
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • container

        public final I container
        接口容器实例
    • Constructor Detail

      • InterfaceContainer

        public InterfaceContainer(java.lang.Class<I> interfaceClass)
    • Method Detail

      • register

        public void register(I listener)
        将接口实例加入容器
        Parameters:
        listener -
      • unregister

        public void unregister(I listener)
        从容器中删除指定的接口实例
        Parameters:
        listener -
      • setSkipOnError

        public InterfaceContainer<I> setSkipOnError(boolean skipOnError)
        设置当执行容器中的接口实例有异常抛出时的动作
        true时跳过继续执行下一个容器
        false时抛出异常
        Parameters:
        skipOnError - 当调用抛出异常时是否忽略
        Returns:
        当前实例
      • setLogOnError

        public InterfaceContainer<I> setLogOnError(boolean logOnError)
        设置当执行容器中的接口实例有异常抛出时是否日志输出(仅当skipOnError为true时有效)
        Parameters:
        logOnError - 当调用抛出异常时是否输出日志
        Returns:
        当前实例

Copyright © 2021. All Rights Reserved.