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.newJMSEndpoint(endpointClass);
        endpoint.setShortName(endpointName);
        dep.getService().addEndpoint(endpoint);

        return endpoint;
    }
View Full Code Here


            final String ejbName = container.getComponentName();
            this.log.debug("EJB3 name: " + ejbName);
            final String ejbClass = container.getComponentClassName();
            this.log.debug("EJB3 class: " + ejbClass);

            final Endpoint ep = this.newHttpEndpoint(ejbClass, ejbName, dep);
            ep.setProperty(ASHelper.CONTAINER_NAME, container.getContainerName());
        }
    }
View Full Code Here

      this.servletName = servletName;
   }

   public Endpoint query(Iterator<Endpoint> endpoints)
   {
      Endpoint endpoint = null;

      if (contextPath.startsWith("/"))
         contextPath = contextPath.substring(1);

      while(endpoints.hasNext())
      {
         Endpoint auxEndpoint = endpoints.next();
         ObjectName sepId = auxEndpoint.getName();
         String propContext = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
         String propEndpoint = sepId.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);
         if (servletName.equals(propEndpoint) && contextPath.equals(propContext))
         {
            endpoint = auxEndpoint;
View Full Code Here

      deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
   }

   public void testCustomizationWriteAccess() throws Exception
   {
      Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
      JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
      jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
      endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);

      // a started endpoint should deny customizations
      try
      {
         endpoint.setState(EndpointState.STARTED);
         endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);

         fail("It should not be possible to change bindinig customizations on a started endpoint");
      }
      catch (Exception e)
      {
View Full Code Here

      }
   }

   public void testCustomizationReadAccess() throws Exception
   {
      Endpoint endpoint = deploymentModelFactory.newEndpoint(null);
      JAXBBindingCustomization jaxbCustomization = new JAXBBindingCustomization();
      jaxbCustomization.put(JAXBBindingCustomization.DEFAULT_NAMESPACE_REMAP, "http://org.jboss.bindingCustomization");
      endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
      endpoint.setState(EndpointState.STARTED);

      // read a single customization
      BindingCustomization knownCustomization = endpoint.getAttachment(BindingCustomization.class);
      assertNotNull(knownCustomization);

      // however the iteratoion should be unmodifiable
      try
      {
         endpoint.addAttachment(BindingCustomization.class, jaxbCustomization);
         fail("Started Endpoints should only axpose read acccess to their binding customizations");
      }
      catch (Exception e)
      {
         // all fine, we'd expect this
View Full Code Here

      // Get the URL pattern from the endpoint
      String linkName = sepMetaData.getLinkName();
      if (linkName != null)
      {
         Endpoint endpoint = dep.getService().getEndpointByName(linkName);
         if (endpoint != null)
            urlPattern = endpoint.getURLPattern();
      }

      // If not, derive the context root from the deployment
      if (contextRoot == null)
      {
View Full Code Here

   protected void processSOAPMessage(String fromName, InputStream inputStream, OutputStream outStream) throws SOAPException, IOException, RemoteException
   {
      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      EndpointRegistry epRegistry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();

      Endpoint endpoint = getEndpointForDestination(epRegistry, fromName);

      if (endpoint == null)
         throw new IllegalStateException("Cannot find endpoint for: " + fromName);

      log.debug("dipatchMessage: " + endpoint.getName());

      RequestHandler reqHandler = endpoint.getRequestHandler();

      try
      {
         InvocationContext invContext = new InvocationContext();
         invContext.setTargetBean(this);
View Full Code Here

   }

   // The destination jndiName is encoded in the service object name under key 'jms'
   private Endpoint getEndpointForDestination(EndpointRegistry epRegistry, String fromName)
   {
      Endpoint endpoint = null;
      for (ObjectName oname : epRegistry.getEndpoints())
      {
         Endpoint aux = epRegistry.getEndpoint(oname);
         String jmsProp = aux.getName().getKeyProperty("jms");
         if (jmsProp != null && jmsProp.equals(fromName))
         {
            endpoint = aux;
            break;
         }
View Full Code Here

        } catch (final MalformedObjectNameException e) {
            throw new OperationFailedException(new ModelNode().set(e.getMessage()));
        }

        final EndpointRegistry registry = (EndpointRegistry) controller.getValue();
        final Endpoint endpoint = registry.getEndpoint(endpointObjectName);

        final ModelNode result = new ModelNode();
        if (endpoint != null && endpoint.getEndpointMetrics() != null) {
            final EndpointMetrics endpointMetrics = endpoint.getEndpointMetrics();
            if (MIN_PROCESSING_TIME.equals(metricName)) {
                result.set(String.valueOf(endpointMetrics.getMinProcessingTime()));
            } else if (MAX_PROCESSING_TIME.equals(metricName)) {
                result.set(String.valueOf(endpointMetrics.getMaxProcessingTime()));
            } else if (AVERAGE_PROCESSING_TIME.equals(metricName)) {
View Full Code Here

        } catch (final MalformedObjectNameException e) {
            throw new OperationFailedException(new ModelNode().set(e.getMessage()));
        }

        final EndpointRegistry registry = (EndpointRegistry) controller.getValue();
        final Endpoint endpoint = registry.getEndpoint(endpointObjectName);

        final ModelNode result = new ModelNode();
        if (endpoint != null && endpoint.getEndpointMetrics() != null) {
            final EndpointMetrics endpointMetrics = endpoint.getEndpointMetrics();
            if (MIN_PROCESSING_TIME.equals(metricName)) {
                result.set(String.valueOf(endpointMetrics.getMinProcessingTime()));
            } else if (MAX_PROCESSING_TIME.equals(metricName)) {
                result.set(String.valueOf(endpointMetrics.getMaxProcessingTime()));
            } else if (AVERAGE_PROCESSING_TIME.equals(metricName)) {
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.