Package com.springsource.insight.intercept.plugin

Examples of com.springsource.insight.intercept.plugin.CollectionSettingsRegistry


    @Before
    @Override
    public void setUp() {
        super.setUp();
        registry = new CollectionSettingsRegistry();
        generator = new JdbcQueryExternalResourceGenerator(registry);
    }
View Full Code Here


    @After
    public void restore() {
        JdbcDriverConnectOperationCollectionAspect aspectInstance = getAspect();
        aspectInstance.setSensitiveValueMarker(originalMarker);
        // restore the original obfuscation settings
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(JdbcDriverConnectOperationCollectionAspect.OBFUSCATED_PROPERTIES_SETTING,
                JdbcDriverConnectOperationCollectionAspect.DEFAULT_OBFUSCATED_PROPERTIES_LIST);
        super.restore();
    }
View Full Code Here

                true);
    }

    @Test
    public void testPropertiesObfuscation() throws SQLException {
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        // make sure the defaults are overridden
        registry.set(JdbcDriverConnectOperationCollectionAspect.OBFUSCATED_PROPERTIES_SETTING, "x,y,z");
        Operation op = runConnectionTest();
        assertObscuredProperties(op,
                StringUtil.explode(JdbcDriverConnectOperationCollectionAspect.DEFAULT_OBFUSCATED_PROPERTIES_LIST, ","),
                false);
    }
View Full Code Here

    @Override
    @Before
    public void setUp() {
        super.setUp();

        registry = new CollectionSettingsRegistry();
        analyzer = new JmxInvocationEndPointAnalyzer(registry);
    }
View Full Code Here

    @Test
    public void testFilesCacheCapacityUpdateWithNumber() {
        FilesCache cache = AbstractFilesTrackerAspectSupport.filesCache;
        int oldCapacity = cache.getMaxCapacity(), newCapacity = oldCapacity + 7365;
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(AbstractFilesTrackerAspectSupport.MAX_TRACKED_FILES_SETTING, Integer.valueOf(newCapacity));
        assertEquals("Mismatched capacity after update", newCapacity, cache.getMaxCapacity());
    }
View Full Code Here

    @Test
    public void testFilesCacheCapacityUpdateWithString() {
        FilesCache cache = AbstractFilesTrackerAspectSupport.filesCache;
        int oldCapacity = cache.getMaxCapacity(), newCapacity = oldCapacity + 7365;
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(AbstractFilesTrackerAspectSupport.MAX_TRACKED_FILES_SETTING, String.valueOf(newCapacity));
        assertEquals("Mismatched capacity after update", newCapacity, cache.getMaxCapacity());
    }
View Full Code Here

    @Test
    public void testFilesCacheCapacityUpdateWithBadString() {
        FilesCache cache = AbstractFilesTrackerAspectSupport.filesCache;
        int capacity = cache.getMaxCapacity();
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(AbstractFilesTrackerAspectSupport.MAX_TRACKED_FILES_SETTING, "lyor");
        assertEquals("Unexpected capacity update success", capacity, cache.getMaxCapacity());
    }
View Full Code Here

    @Test
    public void testFilesCacheCapacityUpdateFailOnNegativeNumber() {
        FilesCache cache = AbstractFilesTrackerAspectSupport.filesCache;
        int oldCapacity = cache.getMaxCapacity(), newCapacity = 0 - oldCapacity;
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(AbstractFilesTrackerAspectSupport.MAX_TRACKED_FILES_SETTING, Integer.valueOf(newCapacity));
        assertEquals("Unexpected capacity update success", oldCapacity, cache.getMaxCapacity());
    }
View Full Code Here

    @Test
    public void testFilesCacheCapacityUpdateFailOnBadValueType() {
        FilesCache cache = AbstractFilesTrackerAspectSupport.filesCache;
        int oldCapacity = cache.getMaxCapacity(), newCapacity = oldCapacity + 3777;
        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.set(AbstractFilesTrackerAspectSupport.MAX_TRACKED_FILES_SETTING, new StringBuilder().append(newCapacity));
        assertEquals("Unexpected capacity update success", oldCapacity, cache.getMaxCapacity());
    }
View Full Code Here

    private HttpObfuscator obfuscator;

    public SocketCollectOperationContext() {
        this(HttpObfuscator.getInstance());

        CollectionSettingsRegistry registry = CollectionSettingsRegistry.getInstance();
        registry.addListener(this);
        registry.register(OBSCURED_ADDRESSES_PATTERN_SETTING, NO_PATTERN_VALUE);
    }
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.plugin.CollectionSettingsRegistry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.