Examples of ProxyContext


Examples of flex.messaging.services.http.proxy.ProxyContext

    /** {@inheritDoc} */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
        // We'll update the context just in case....
        if (message instanceof SOAPMessage)
            context.setSoapRequest(true);
        else
            context.setSoapRequest(false);

        setupContext(context, message);

        try
        {
            filterChain.invoke(context);

            //TODO: Do we want a return type that encapsulates the response data?

            // OUTPUT
            AcknowledgeMessage ack = new AcknowledgeMessage();
            ack.setBody(context.getResponse());
            ack.setHeader(Message.STATUS_CODE_HEADER, context.getStatusCode());

            if (context.getRecordHeaders())
            {
                ack.setHeader(REQUEST_HEADERS, context.getRequestHeaders());
                ack.setHeader(RESPONSE_HEADERS, context.getResponseHeaders());
            }

            return ack;
        }
        catch (MessageException ex)
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyContext

    /** {@inheritDoc} */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
        // We'll update the context just in case....
        if (message instanceof SOAPMessage)
            context.setSoapRequest(true);
        else
            context.setSoapRequest(false);

        setupContext(context, message);

        try
        {
            filterChain.invoke(context);

            //TODO: Do we want a return type that encapsulates the response data?

            // OUTPUT
            Object response = context.getResponse();

            if (context.getRecordHeaders())
            {
                AcknowledgeMessage ack = new AcknowledgeMessage();
                ack.setBody(response);
                ack.setHeader(REQUEST_HEADERS, context.getRequestHeaders());
                ack.setHeader(RESPONSE_HEADERS, context.getResponseHeaders());
                return ack;
            }
            else
            {
                return response;
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyContext

    /** {@inheritDoc} */   
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage)msg;
        ProxyContext context = new ProxyContext();

        if (message instanceof SOAPMessage)
        {
            context.setSoapRequest(true);
        }

        setupContext(context, message);

        try
        {
            filterChain.invoke(context);
            return context.getResponse();
        }
        catch (MessageException ex)
        {
            throw ex;
        }
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyContext

     */
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage) msg;

        ProxyContext context = new ProxyContext();

        // SOAPMessages should be sent through the SOAPProxyAdapter, but
        // the default destination may be just to the HTTPProxyAdapter.
        // We'll update the context just in case....
        if (message instanceof SOAPMessage)
            context.setSoapRequest(true);
        else
            context.setSoapRequest(false);

        setupContext(context, message);

        try
        {
            filterChain.invoke(context);

            //TODO: Do we want a return type that encapsulates the response data?

            // OUTPUT
            Object response = context.getResponse();

            if (context.getRecordHeaders())
            {
                AcknowledgeMessage ack = new AcknowledgeMessage();
                ack.setBody(response);
                ack.setHeader("requestHeaders", context.getRequestHeaders());
                ack.setHeader("responseHeaders", context.getResponseHeaders());
                return ack;
            }
            else
            {
                return response;
View Full Code Here

Examples of flex.messaging.services.http.proxy.ProxyContext

    //--------------------------------------------------------------------------
   
    public Object invoke(Message msg)
    {
        HTTPMessage message = (HTTPMessage)msg;
        ProxyContext context = new ProxyContext();

        if (message instanceof SOAPMessage)
        {
            context.setSoapRequest(true);
        }

        setupContext(context, message);

        try
        {
            filterChain.invoke(context);
            return context.getResponse();
        }
        catch (MessageException ex)
        {
            throw ex;
        }
View Full Code Here

Examples of org.jboss.mx.util.ProxyContext

     
      Trivial2MBean mbean = (Trivial2MBean)MBeanProxy.create(
            Trivial2.class, Trivial2MBean.class, oname, server
      );
   
      ProxyContext ctx = (ProxyContext)mbean; 
     
      ctx.getMBeanServer();
   }
View Full Code Here

Examples of org.jboss.mx.util.ProxyContext

      Trivial2MBean mbean = (Trivial2MBean)MBeanProxy.create(
            Trivial2.class, Trivial2MBean.class, oname, server
      );
     
      // query the server this mbean is registered to
      ProxyContext ctx = (ProxyContext)mbean;
      MBeanServer srvr = ctx.getMBeanServer();
     
      Set mbeans = srvr.queryMBeans(new ObjectName("test:*"), null);
      ObjectInstance oi = (ObjectInstance)mbeans.iterator().next();
     
      assertTrue(oi.getObjectName().equals(oname));
View Full Code Here

Examples of org.jboss.mx.util.ProxyContext

      rmm.setModelMBeanInfo(resource.getMBeanInfo());
     
      server.registerMBean(rmm, oname);
      server.registerMBean(rmm, oname2);
     
      ProxyContext ctx  = (ProxyContext)MBeanProxy.get(
            MyInterface.class, oname, server
      );

      ctx.setExceptionHandler(new DefaultExceptionHandler()
      {
         public Object handleInstanceNotFound(ProxyContext proxyCtx, InstanceNotFoundException e, Method m, Object[] args) throws Exception
         {
            return proxyCtx.getMBeanServer().invoke(new ObjectName("test:test=test2"), m.getName(), args, null);
         }
View Full Code Here

Examples of org.jboss.mx.util.ProxyContext

     
      Trivial2MBean mbean = (Trivial2MBean)MBeanProxy.create(
            Trivial2.class, Trivial2MBean.class, oname, server
      );
   
      ProxyContext ctx = (ProxyContext)mbean; 
     
      ctx.getMBeanServer();
   }
View Full Code Here

Examples of org.jboss.mx.util.ProxyContext

      Trivial2MBean mbean = (Trivial2MBean)MBeanProxy.create(
            Trivial2.class, Trivial2MBean.class, oname, server
      );
     
      // query the server this mbean is registered to
      ProxyContext ctx = (ProxyContext)mbean;
      MBeanServer srvr = ctx.getMBeanServer();
     
      Set mbeans = srvr.queryMBeans(new ObjectName("test:*"), null);
      ObjectInstance oi = (ObjectInstance)mbeans.iterator().next();
     
      assertTrue(oi.getObjectName().equals(oname));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.