Search in sources :

Example 1 with Event

use of com.creditease.monitor.interceptframework.spi.InterceptContext.Event in project uavstack by uavorg.

the class DBCPHookProxy method start.

@Override
public void start(HookContext context, ClassLoader webapploader) {
    super.start(context, webapploader);
    Event event = context.get(Event.class);
    switch(event) {
        case SPRING_BEAN_REGIST:
        case WEBCONTAINER_RESOURCE_INIT:
        case WEBCONTAINER_INIT:
            InsertInterceptToClients(context, webapploader);
            break;
        case AFTER_SERVET_INIT:
            break;
        case BEFORE_SERVLET_DESTROY:
            break;
        case GLOBAL_FILTER_REQUEST:
            break;
        case GLOBAL_FILTER_RESPONSE:
            break;
        case WEBCONTAINER_RESOURCE_CREATE:
            break;
        case WEBCONTAINER_STARTED:
            break;
        case WEBCONTAINER_STOPPED:
            break;
        default:
            break;
    }
}
Also used : Event(com.creditease.monitor.interceptframework.spi.InterceptContext.Event)

Example 2 with Event

use of com.creditease.monitor.interceptframework.spi.InterceptContext.Event in project uavstack by uavorg.

the class HikariHookProxy method start.

@Override
public void start(HookContext context, ClassLoader webapploader) {
    super.start(context, webapploader);
    Event event = context.get(Event.class);
    switch(event) {
        case SPRING_BEAN_REGIST:
        case WEBCONTAINER_RESOURCE_INIT:
        case WEBCONTAINER_INIT:
            InsertInterceptToClients(context, webapploader);
            break;
        case AFTER_SERVET_INIT:
            break;
        case BEFORE_SERVLET_DESTROY:
            break;
        case GLOBAL_FILTER_REQUEST:
            break;
        case GLOBAL_FILTER_RESPONSE:
            break;
        case WEBCONTAINER_RESOURCE_CREATE:
            break;
        case WEBCONTAINER_STARTED:
            break;
        case WEBCONTAINER_STOPPED:
            break;
        default:
            break;
    }
}
Also used : Event(com.creditease.monitor.interceptframework.spi.InterceptContext.Event)

Example 3 with Event

use of com.creditease.monitor.interceptframework.spi.InterceptContext.Event in project uavstack by uavorg.

the class MybatisHookProxy method start.

@Override
public void start(HookContext context, ClassLoader webapploader) {
    super.start(context, webapploader);
    Event event = context.get(Event.class);
    switch(event) {
        case SPRING_BEAN_REGIST:
        case WEBCONTAINER_RESOURCE_INIT:
        case WEBCONTAINER_INIT:
            InsertInterceptToClients(context, webapploader);
            break;
        case AFTER_SERVET_INIT:
            break;
        case BEFORE_SERVLET_DESTROY:
            break;
        case GLOBAL_FILTER_REQUEST:
            break;
        case GLOBAL_FILTER_RESPONSE:
            break;
        case WEBCONTAINER_RESOURCE_CREATE:
            break;
        case WEBCONTAINER_STARTED:
            break;
        case WEBCONTAINER_STOPPED:
            break;
        default:
            break;
    }
}
Also used : Event(com.creditease.monitor.interceptframework.spi.InterceptContext.Event)

Example 4 with Event

use of com.creditease.monitor.interceptframework.spi.InterceptContext.Event in project uavstack by uavorg.

the class WebServiceListener method handleEvent.

@Override
public void handleEvent(InterceptContext context) {
    ClassLoader webapploader = (ClassLoader) context.get(InterceptConstants.WEBAPPLOADER);
    // switch event
    Event event = context.getEvent();
    switch(event) {
        case SPRING_BEAN_REGIST:
        case WEBCONTAINER_INIT:
            insertWebServiceInterceptor(context, webapploader);
            break;
        case AFTER_SERVET_INIT:
        case WEBCONTAINER_STARTED:
        case BEFORE_SERVLET_DESTROY:
        case WEBCONTAINER_STOPPED:
        default:
            break;
    }
}
Also used : Event(com.creditease.monitor.interceptframework.spi.InterceptContext.Event)

Example 5 with Event

use of com.creditease.monitor.interceptframework.spi.InterceptContext.Event in project uavstack by uavorg.

the class AppFrkHookFactoryListener method handleEvent.

@Override
public void handleEvent(InterceptContext context) {
    // get webapp classloader
    ClassLoader webapploader = (ClassLoader) context.get(InterceptConstants.WEBAPPLOADER);
    // swtich event
    Event evt = context.getEvent();
    switch(evt) {
        case SPRING_BEAN_REGIST:
        case WEBCONTAINER_RESOURCE_INIT:
        case WEBCONTAINER_RESOURCE_CREATE:
        case WEBCONTAINER_INIT:
        case AFTER_SERVET_INIT:
        case WEBCONTAINER_STARTED:
            startAppFrkHook(evt, webapploader, context);
            break;
        case BEFORE_SERVLET_DESTROY:
        case WEBCONTAINER_STOPPED:
            stopAppFrkHook(evt, webapploader, context);
            break;
        default:
            break;
    }
}
Also used : Event(com.creditease.monitor.interceptframework.spi.InterceptContext.Event)

Aggregations

Event (com.creditease.monitor.interceptframework.spi.InterceptContext.Event)9 InterceptContext (com.creditease.monitor.interceptframework.spi.InterceptContext)3 StandardProfileContext (com.creditease.uav.profiling.StandardProfileContext)1 ProfileContext (com.creditease.uav.profiling.spi.ProfileContext)1 ProfileFactory (com.creditease.uav.profiling.spi.ProfileFactory)1 List (java.util.List)1