Package org.jboss.wsf.spi.deployment

Examples of org.jboss.wsf.spi.deployment.Endpoint


        if (endpointClass == null) {
            throw new NullPointerException("Null endpoint class");
        }

        final Endpoint endpoint = this.deploymentModelFactory.newHttpEndpoint(endpointClass);
        endpoint.setShortName(endpointName);
        dep.getService().addEndpoint(endpoint);

        return endpoint;
    }
View Full Code Here


        if (endpointClass == null) {
            throw new NullPointerException("Null endpoint class");
        }

        final Endpoint endpoint = this.deploymentModelFactory.newJMSEndpoint(endpointClass);
        endpoint.setShortName(endpointName);
        dep.getService().addEndpoint(endpoint);

        return endpoint;
    }
View Full Code Here

      }
   }

   public Endpoint query(Iterator<Endpoint> endpoints)
   {
      Endpoint endpoint = null;
      while (endpoints.hasNext())
      {
         Endpoint aux = endpoints.next();
         String jmsProp = aux.getName().getKeyProperty("jms");
         if (jmsProp != null && jmsProp.equals(fromName))
         {
            endpoint = aux;
            break;
         }
View Full Code Here

   private static Logger log = Logger.getLogger(RecordingServerHandler.class);
  
   @SuppressWarnings("unchecked")
   protected boolean handleInbound(MessageContext ctx)
   {
      Endpoint endpoint = EndpointAssociation.getEndpoint();
      if (endpoint != null && isRecording(endpoint))
      {
         Record record = RecordFactory.newRecord();
         RecordGroupAssociation.pushGroupID(record.getGroupID());
         record.setDate(new Date());
         HttpServletRequest httpServletRequest = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
         if (httpServletRequest != null)
         {
            try
            {
               record.setDestinationHost(new URL(httpServletRequest.getRequestURL().toString()).getHost());
               record.setSourceHost(httpServletRequest.getRemoteHost());
            }
            catch (Exception e)
            {
               log.warn("Unable to read from the http servlet request! " + e.getMessage());
            }
         }
         record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_REQUEST_HEADERS)));
         record.setMessageType(MessageType.INBOUND);
         record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
         boolean processEnvelope = false;
         for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
         {
            processEnvelope = it.next().isProcessEnvelope();
         }
         if (processEnvelope) //skip message processing if not required since it's very time-consuming
         {
            SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
            try
            {
               SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
               if (soapEnv != null)
               {
                  record.setEnvelope(DOMWriter.printNode(soapEnv, true));
               }
            }
            catch (SOAPException ex)
            {
               log.error("Cannot trace SOAPMessage", ex);
            }
         }
         endpoint.processRecord(record);
      }
      return true;
   }
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   protected boolean handleOutbound(MessageContext ctx)
   {
      Endpoint endpoint = EndpointAssociation.getEndpoint();
      if (endpoint != null && isRecording(endpoint))
      {
         String groupID = RecordGroupAssociation.popGroupID();
         Record record = RecordFactory.newRecord(groupID);
         record.setDate(new Date());
         record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_RESPONSE_HEADERS)));
         record.setMessageType(MessageType.OUTBOUND);
         record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
         boolean processEnvelope = false;
         for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
         {
            processEnvelope = it.next().isProcessEnvelope();
         }
         if (processEnvelope) //skip message processing if not required since it's very time-consuming
         {
            SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
            try
            {
               SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
               if (soapEnv != null)
               {
                  record.setEnvelope(DOMWriter.printNode(soapEnv, true));
               }
            }
            catch (SOAPException ex)
            {
               log.error("Cannot trace SOAPMessage", ex);
            }
         }
         endpoint.processRecord(record);
      }
      return true;
   }
View Full Code Here

      return endpoints;
   }

   public Endpoint getEndpointByName(String shortName)
   {
      Endpoint retEndpoint = null;
      for (Endpoint ep : endpoints)
      {
         if (ep.getShortName().equals(shortName))
         {
            retEndpoint = ep;
View Full Code Here

         writer.print("</tr>");
      }

      for (ObjectName oname : epNames)
      {
         Endpoint ep = epRegistry.getEndpoint(oname);

         writer.print("<tr>");
         writer.print("  <td>Endpoint Name</td>");
         writer.print("  <td>" + ep.getName() + "</td>");
         writer.print("</tr>");
         writer.print("<tr>");
         writer.print("  <td>Endpoint Address</td>");
         writer.print("  <td>" + getAddressHtmlTag(requestURL, ep) + "</td>");
         writer.print("</tr>");
         writer.print("<tr>");
         writer.print("  <td colspan=2>");
         writer.print("  ");
         writer.print("");

         EndpointMetrics metrics = ep.getEndpointMetrics();
         if (metrics != null)
         {
            writer.print("<table class='metrics'>");
            writer.print("<tr>");
            writer.print(" <td>StartTime</td>");
View Full Code Here

         throw new IllegalArgumentException("Endpoint name cannot be null");

      if (isRegistered(epName) == false)
         throw new IllegalStateException("Endpoint not registered: " + epName);

      Endpoint endpoint = endpoints.get(epName);
      return endpoint;
   }
View Full Code Here

   private static Logger log = Logger.getLogger(RecordingServerHandler.class);
  
   @SuppressWarnings("unchecked")
   protected boolean handleInbound(MessageContext ctx)
   {
      Endpoint endpoint = EndpointAssociation.getEndpoint();
      if (endpoint != null && isRecording(endpoint))
      {
         Record record = RecordFactory.newRecord();
         RecordGroupAssociation.pushGroupID(record.getGroupID());
         record.setDate(new Date());
         HttpServletRequest httpServletRequest = (HttpServletRequest)ctx.get(MessageContext.SERVLET_REQUEST);
         if (httpServletRequest != null)
         {
            try
            {
               record.setDestinationHost(new URL(httpServletRequest.getRequestURL().toString()).getHost());
               record.setSourceHost(httpServletRequest.getRemoteHost());
            }
            catch (Exception e)
            {
               log.warn("Unable to read from the http servlet request! " + e.getMessage());
            }
         }
         record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_REQUEST_HEADERS)));
         record.setMessageType(MessageType.INBOUND);
         record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
         boolean processEnvelope = false;
         for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
         {
            processEnvelope = it.next().isProcessEnvelope();
         }
         if (processEnvelope) //skip message processing if not required since it's very time-consuming
         {
            SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
            try
            {
               SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
               if (soapEnv != null)
               {
                  record.setEnvelope(DOMWriter.printNode(soapEnv, true));
               }
            }
            catch (SOAPException ex)
            {
               log.error("Cannot trace SOAPMessage", ex);
            }
         }
         endpoint.processRecord(record);
      }
      return true;
   }
View Full Code Here

   }

   @SuppressWarnings("unchecked")
   protected boolean handleOutbound(MessageContext ctx)
   {
      Endpoint endpoint = EndpointAssociation.getEndpoint();
      if (endpoint != null && isRecording(endpoint))
      {
         String groupID = RecordGroupAssociation.popGroupID();
         Record record = RecordFactory.newRecord(groupID);
         record.setDate(new Date());
         record.setHeaders((Map<String,List<String>>)(ctx.get(MessageContext.HTTP_RESPONSE_HEADERS)));
         record.setMessageType(MessageType.OUTBOUND);
         record.setOperation((QName)ctx.get(MessageContext.WSDL_OPERATION));
         boolean processEnvelope = false;
         for (Iterator<RecordProcessor> it = endpoint.getRecordProcessors().iterator(); it.hasNext() && !processEnvelope; )
         {
            processEnvelope = it.next().isProcessEnvelope();
         }
         if (processEnvelope) //skip message processing if not required since it's very time-consuming
         {
            SOAPMessageContext soapCtx = (SOAPMessageContext)ctx;
            try
            {
               SOAPEnvelope soapEnv = soapCtx.getMessage().getSOAPPart().getEnvelope();
               if (soapEnv != null)
               {
                  record.setEnvelope(DOMWriter.printNode(soapEnv, true));
               }
            }
            catch (SOAPException ex)
            {
               log.error("Cannot trace SOAPMessage", ex);
            }
         }
         endpoint.processRecord(record);
      }
      return true;
   }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.deployment.Endpoint

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.