Search in sources :

Example 11 with JDKProxyInvokeHandler

use of com.creditease.monitor.proxy.spi.JDKProxyInvokeHandler in project uavstack by uavorg.

the class DynamicProxyInstaller method adapt.

@SuppressWarnings("rawtypes")
public static Object adapt(Object t) {
    if (!Proxy.isProxyClass(t.getClass())) {
        return t;
    }
    InvocationHandler ih = Proxy.getInvocationHandler(t);
    if (ih == null) {
        return t;
    }
    if (!JDKProxyInvokeHandler.class.isAssignableFrom(ih.getClass())) {
        return t;
    }
    JDKProxyInvokeHandler jpih = (JDKProxyInvokeHandler) ih;
    return jpih.getTarget();
}
Also used : JDKProxyInvokeHandler(com.creditease.monitor.proxy.spi.JDKProxyInvokeHandler) InvocationHandler(java.lang.reflect.InvocationHandler)

Aggregations

JDKProxyInvokeHandler (com.creditease.monitor.proxy.spi.JDKProxyInvokeHandler)11 HashMap (java.util.HashMap)3 Binding (javax.xml.ws.Binding)3 BindingProvider (javax.xml.ws.BindingProvider)3 Handler (javax.xml.ws.handler.Handler)3 DynamicServletContextProcessor (com.creditease.monitor.jee.servlet30.DynamicServletContextProcessor)2 Future (java.util.concurrent.Future)2 ServletContext (javax.servlet.ServletContext)2 SOAPHandler (javax.xml.ws.handler.soap.SOAPHandler)2 PullCallback (com.alibaba.rocketmq.client.consumer.PullCallback)1 RocketMQProducerAdapter (com.creditease.uav.hook.rocketmq.adapter.RocketMQProducerAdapter)1 RocketMQPullConsumerAdapter (com.creditease.uav.hook.rocketmq.adapter.RocketMQPullConsumerAdapter)1 IOException (java.io.IOException)1 InvocationHandler (java.lang.reflect.InvocationHandler)1 Map (java.util.Map)1 ServletContextEvent (javax.servlet.ServletContextEvent)1 Dispatch (javax.xml.ws.Dispatch)1 HttpException (org.apache.http.HttpException)1 HttpRequest (org.apache.http.HttpRequest)1 RequestLine (org.apache.http.RequestLine)1