@Test public void validateSystemPropertiesShouldNotThrowErrorIfObsoleteSystemPropertyNotSet() throws Exception { Mockery context = new Mockery(); final Logger logger = context.mock(Logger.class); context.checking(new Expectations() { { } }); Properties configuration = new Properties(); WsCheckAliveFilter.validateSystemProperties(configuration, logger); context.assertIsSatisfied(); }
public static void validateSystemProperties(Properties configuration, Logger logger) { if (configuration != null && configuration.containsKey(OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY)) { String message = String.format( "System property %s is no longer supported, please use accept-option %s instead in the gateway configuration file", OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY, "ws.inactivity.timeout"); logger.error(message); throw new RuntimeException(message); } }
WsCheckAliveFilter extends IoFilterAdapter<IoSessionEx> { public static void validateSystemProperties(Properties configuration, Logger logger) { if (configuration != null && configuration.containsKey(OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY)) { String message = String.format( "System property %s is no longer supported, please use accept-option %s instead in the gateway configuration file", OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY, "ws.inactivity.timeout"); logger.error(message); throw new RuntimeException(message); } } }
WsCheckAliveFilter extends IoFilterAdapter<IoSessionEx> { public static void validateSystemProperties(Properties configuration, Logger logger) { if (configuration != null && configuration.containsKey(OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY)) { String message = String.format( "System property %s is no longer supported, please use accept-option %s instead in the gateway configuration file", OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY, "ws.inactivity.timeout"); logger.error(message); throw new RuntimeException(message); } } WsCheckAliveFilter(long inactivityTimeout, Logger logger);   WsCheckAliveFilter(long inactivityTimeout, IoSession wsSession, Logger logger); }
WsCheckAliveFilter extends IoFilterAdapter<IoSessionEx> { public static void validateSystemProperties(Properties configuration, Logger logger) { if (configuration != null && configuration.containsKey(OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY)) { String message = String.format( "System property %s is no longer supported, please use accept-option %s instead in the gateway configuration file", OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY, "ws.inactivity.timeout"); logger.error(message); throw new RuntimeException(message); } } WsCheckAliveFilter(long inactivityTimeout, Logger logger);   WsCheckAliveFilter(long inactivityTimeout, IoSession wsSession, Logger logger); static void validateSystemProperties(Properties configuration, Logger logger); static void addIfFeatureEnabled(IoFilterChain filterChain, String filterName, long inactivityTimeoutIn, Logger logger); static void addIfFeatureEnabled(IoFilterChain filterChain, String filterName, long inactivityTimeoutIn,
                                           IoSessionEx wsSession, Logger logger); static void moveIfFeatureEnabled(IoFilterChain fromChain, IoFilterChain toChain,
                                            String filterName, long inactivityTimeout, Logger logger); static void updateExtensions(IoFilterChain filterChain); @Override void onPostAdd(IoFilterChain filterChain, String name, NextFilter nextFilter); @Override void onPreRemove(IoFilterChain filterChain,
                            String name,
                            NextFilter nextFilter); }
WsCheckAliveFilter extends IoFilterAdapter<IoSessionEx> { public static void validateSystemProperties(Properties configuration, Logger logger) { if (configuration != null && configuration.containsKey(OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY)) { String message = String.format( "System property %s is no longer supported, please use accept-option %s instead in the gateway configuration file", OBSOLETE_INACTIVITY_TIMEOUT_PROPERTY, "ws.inactivity.timeout"); logger.error(message); throw new RuntimeException(message); } } WsCheckAliveFilter(long inactivityTimeout, Logger logger);   WsCheckAliveFilter(long inactivityTimeout, IoSession wsSession, Logger logger); static void validateSystemProperties(Properties configuration, Logger logger); static void addIfFeatureEnabled(IoFilterChain filterChain, String filterName, long inactivityTimeoutIn, Logger logger); static void addIfFeatureEnabled(IoFilterChain filterChain, String filterName, long inactivityTimeoutIn,
                                           IoSessionEx wsSession, Logger logger); static void moveIfFeatureEnabled(IoFilterChain fromChain, IoFilterChain toChain,
                                            String filterName, long inactivityTimeout, Logger logger); static void updateExtensions(IoFilterChain filterChain); @Override void onPostAdd(IoFilterChain filterChain, String name, NextFilter nextFilter); @Override void onPreRemove(IoFilterChain filterChain,
                            String name,
                            NextFilter nextFilter); static final long DISABLE_INACTIVITY_TIMEOUT; static final long DEFAULT_WS_INACTIVITY_TIMEOUT_MILLIS; }