Package org.jboss.wsf.spi.metadata.j2ee.serviceref

Examples of org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData


   {
      log.trace("CommonConfig newChild: " + localName);

      if ("pre-handler-chain".equals(localName))
      {
         UnifiedHandlerChainMetaData preHandlerChain = new UnifiedHandlerChainMetaData(null);
         commonConfig.setPreHandlerChain(preHandlerChain);
         return preHandlerChain;
      }
      if ("post-handler-chain".equals(localName))
      {
         UnifiedHandlerChainMetaData postHandlerChain = new UnifiedHandlerChainMetaData(null);
         commonConfig.setPostHandlerChain(postHandlerChain);
         return postHandlerChain;
      }
      return null;
   }
View Full Code Here


   {
      HandlerMetaDataJAXWS hmd = new HandlerMetaDataJAXWS(type);
      hmd.setHandlerName(uhmd.getHandlerName());
      hmd.setHandlerClassName(uhmd.getHandlerClass());
      hmd.setInitParams(uhmd.getInitParams());
      UnifiedHandlerChainMetaData handlerChain = uhmd.getHandlerChain();
      if (handlerChain != null)
      {
         hmd.setProtocolBindings(handlerChain.getProtocolBindings());
         hmd.setServiceNamePattern(handlerChain.getServiceNamePattern());
         hmd.setPortNamePattern(handlerChain.getPortNamePattern());
      }
      return hmd;
   }
View Full Code Here

   @Override
   public List<HandlerMetaData> getHandlers(EndpointMetaData epMetaData, HandlerType type)
   {
      List<HandlerMetaData> handlers = new ArrayList<HandlerMetaData>();
     
      UnifiedHandlerChainMetaData handlerChain;
      if (type == HandlerType.PRE)
         handlerChain = getPreHandlerChain();
      else if (type == HandlerType.POST)
         handlerChain = getPostHandlerChain();
      else
         throw new IllegalArgumentException("Invalid handler type: " + type);
     
      if (handlerChain != null)
      {
         for (UnifiedHandlerMetaData uhmd : handlerChain.getHandlers())
         {
            HandlerMetaDataJAXRPC hmd = HandlerMetaDataJAXRPC.newInstance(uhmd, type);
            handlers.add(hmd);
         }
      }
View Full Code Here

      assertNull(epc1.getPreHandlerChain());
      assertNull(epc1.getPostHandlerChain());
      assertFalse("MTOM should not be enabled" , epc1.hasFeature("http://org.jboss.ws/mtom"));

      assertEquals("Standard WSSecurity Endpoint", epc2.getConfigName());
      UnifiedHandlerChainMetaData preChain = epc2.getPreHandlerChain();
      assertEquals(1, preChain.getHandlers().size());
      UnifiedHandlerMetaData h1 = (UnifiedHandlerMetaData)preChain.getHandlers().get(0);
      assertEquals("WSSecurityHandlerInbound", h1.getHandlerName());
      assertEquals("org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerInbound", h1.getHandlerClass());
   }
View Full Code Here

      // mtom
      assertTrue(portComp.isEnableMtom());

      // handler chains
      UnifiedHandlerChainMetaData handlerChain = portComp.getHandlerChains().getHandlerChains().get(0);
      assertNotNull(handlerChain);
      assertTrue( ((UnifiedHandlerMetaData)handlerChain.getHandlers().get(0)).getHandlerName().equals("ServerHandler1"));

   }
View Full Code Here

    private List<UnifiedHandlerChainMetaData> buildChainMD(ModelNode handlerChainsNode) {
        List<UnifiedHandlerChainMetaData> handlerChains = new ArrayList<UnifiedHandlerChainMetaData>();
        if (handlerChainsNode.getType() == ModelType.LIST) {
            for (ModelNode chainNode : handlerChainsNode.asList()) {
                UnifiedHandlerChainMetaData chainMetaData = new UnifiedHandlerChainMetaData();
                if (chainNode.hasDefined(Constants.PROTOCOL_BINDING)) {
                    chainMetaData.setProtocolBindings(chainNode.get(Constants.PROTOCOL_BINDING).asString());
                }
                if (chainNode.hasDefined(Constants.SERVICE_NAME_PATTERN)) {
                    chainMetaData.setServiceNamePattern(new QName(chainNode.get(Constants.SERVICE_NAME_PATTERN).asString()));
                }
                if (chainNode.hasDefined(Constants.PORT_NAME_PATTERN)) {
                    chainMetaData.setPortNamePattern(new QName(chainNode.get(Constants.PORT_NAME_PATTERN).asString()));
                }
                if (chainNode.hasDefined(Constants.HANDLER)) {
                    for (String key : chainNode.get(Constants.HANDLER).keys()) {
                        UnifiedHandlerMetaData handlerMD = new UnifiedHandlerMetaData();
                        handlerMD.setHandlerName(key);
                        handlerMD.setHandlerClass(chainNode.get(Constants.HANDLER).get(key).asString());
                        chainMetaData.addHandler(handlerMD);
                    }

                }
                handlerChains.add(chainMetaData);
            }
View Full Code Here

      assertNull(epc1.getPreHandlerChain());
      assertNull(epc1.getPostHandlerChain());
      assertFalse("MTOM should not be enabled", epc1.hasFeature("http://org.jboss.ws/mtom"));

      assertEquals("Standard WSSecurity Endpoint", epc2.getConfigName());
      UnifiedHandlerChainMetaData preChain = epc2.getPreHandlerChain();
      assertEquals(1, preChain.getHandlers().size());
      UnifiedHandlerMetaData h1 = (UnifiedHandlerMetaData)preChain.getHandlers().get(0);
      assertEquals("WSSecurityHandlerInbound", h1.getHandlerName());
      assertEquals("org.jboss.ws.extensions.security.jaxrpc.WSSecurityHandlerInbound", h1.getHandlerClass());
   }
View Full Code Here

      // mtom
      assertTrue(portComp.isEnableMtom());

      // handler chains
      UnifiedHandlerChainMetaData handlerChain = portComp.getHandlerChains().getHandlerChains().get(0);
      assertNotNull(handlerChain);
      assertTrue(((UnifiedHandlerMetaData)handlerChain.getHandlers().get(0)).getHandlerName().equals("CustomHandler"));

   }
View Full Code Here

   {
      log.trace("WSHandlerChainsConfig newChild: " + localName);

      if ("handler-chain".equals(localName))
      {
         UnifiedHandlerChainMetaData handlerChain = new UnifiedHandlerChainMetaData(null);
         handlerChains.getHandlerChains().add(handlerChain);
         return handlerChain;
      }
      return null;
   }
View Full Code Here

    private List<UnifiedHandlerChainMetaData> buildChainMD(ModelNode handlerChainsNode) {
        List<UnifiedHandlerChainMetaData> handlerChains = new ArrayList<UnifiedHandlerChainMetaData>();
        if (handlerChainsNode.getType() == ModelType.LIST) {
            for (ModelNode chainNode : handlerChainsNode.asList()) {
                UnifiedHandlerChainMetaData chainMetaData = new UnifiedHandlerChainMetaData();
                if (chainNode.hasDefined(Constants.PROTOCOL_BINDING)) {
                    chainMetaData.setProtocolBindings(chainNode.get(Constants.PROTOCOL_BINDING).asString());
                }
                if (chainNode.hasDefined(Constants.SERVICE_NAME_PATTERN)) {
                    chainMetaData.setServiceNamePattern(new QName(chainNode.get(Constants.SERVICE_NAME_PATTERN).asString()));
                }
                if (chainNode.hasDefined(Constants.PORT_NAME_PATTERN)) {
                    chainMetaData.setPortNamePattern(new QName(chainNode.get(Constants.PORT_NAME_PATTERN).asString()));
                }
                if (chainNode.hasDefined(Constants.HANDLER)) {
                    for (String key : chainNode.get(Constants.HANDLER).keys()) {
                        UnifiedHandlerMetaData handlerMD = new UnifiedHandlerMetaData();
                        handlerMD.setHandlerName(key);
                        handlerMD.setHandlerClass(chainNode.get(Constants.HANDLER).get(key).asString());
                        chainMetaData.addHandler(handlerMD);
                    }

                }
                handlerChains.add(chainMetaData);
            }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerChainMetaData

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.