Package org.jboss.wsf.spi.management

Examples of org.jboss.wsf.spi.management.EndpointRegistry


     *
     * @return endpoint registry
     */
    public EndpointRegistry getEndpointRegistry() {
        try {
            EndpointRegistry registry = ASHelper.getMSCService(WSServices.REGISTRY_SERVICE, EndpointRegistry.class);
            if (registry == null) {
                registry = fallbackRegistry;
            }
            return registry;
        } catch (Exception e) {
View Full Code Here


            dam.deploy(dep);
            // TODO: [JBWS-3426] fix this. START workaround
            if (target == null) {
                SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
                EndpointRegistryFactory factory = spiProvider.getSPI(EndpointRegistryFactory.class);
                EndpointRegistry registry = factory.getEndpointRegistry();
                for (final Endpoint endpoint : dep.getService().getEndpoints()) {
                    registry.register(endpoint);
                }
            }
            // END workaround
        } finally {
            if (dep != null) {
View Full Code Here

                final ServiceTarget target = deployment.getAttachment(ServiceTarget.class);
                // TODO: [JBWS-3426] fix this. START workaround
                if (target == null) {
                    SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
                    EndpointRegistryFactory factory = spiProvider.getSPI(EndpointRegistryFactory.class);
                    EndpointRegistry registry = factory.getEndpointRegistry();
                    for (final Endpoint endpoint : deployment.getService().getEndpoints()) {
                        registry.unregister(endpoint);
                    }
                }
                // END workaround
                DeploymentAspectManager dam = new DeploymentAspectManagerImpl();
                dam.setDeploymentAspects(aspects);
View Full Code Here

            endpointObjectName = new ObjectName("jboss.ws:context=" + webContext + ",endpoint=" + endpointName);
        } 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)) {
View Full Code Here

public class EndpointRegistryDeploymentAspect extends DeploymentAspect
{
   public void create(Deployment dep)
   {
      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
      for (Endpoint ep : dep.getService().getEndpoints())
      {
         registry.register(ep);
      }
   }
View Full Code Here

   }

   public void destroy(Deployment dep)
   {
      SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
      EndpointRegistry registry = spiProvider.getSPI(EndpointRegistryFactory.class).getEndpointRegistry();
           
      for (Endpoint ep : dep.getService().getEndpoints())
      {
         registry.unregister(ep);
      }
   }
View Full Code Here

    private static final DotName WEB_SERVICE_REF_ANNOTATION_NAME = DotName.createSimple(WebServiceRef.class.getName());
    private static final DotName WEB_SERVICE_REFS_ANNOTATION_NAME = DotName.createSimple(WebServiceRefs.class.getName());

    /** {@inheritDoc} **/
    protected void processComponentConfig(final DeploymentUnit deploymentUnit, final DeploymentPhaseContext phaseContext, final CompositeIndex index, final AbstractComponentDescription description) {
        EndpointRegistry registry = (EndpointRegistry) deploymentUnit.getServiceRegistry().getService(WSServices.REGISTRY_SERVICE).getValue();
        for (ObjectName name: registry.getEndpoints()) {
            Logger.getLogger(this.getClass()).fatal(name.toString());
        }
        final ClassInfo classInfo = index.getClassByName(DotName.createSimple(description.getComponentClassName()));
        if(classInfo == null) {
            return; // We can't continue without the annotation index info.
View Full Code Here

    }
   
    SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
    EndpointRegistryFactory factory = spiProv
        .getSPI(EndpointRegistryFactory.class);
    EndpointRegistry registry = factory.getEndpointRegistry();
    Set<ObjectName> objectNames = registry.getEndpoints();

    for (ObjectName objectName : objectNames) {
      String endpoint = objectName
          .getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);

      if (endpoint != null && endpoint.equals(endpointName)) {
        Endpoint ep = registry.getEndpoint(objectName);
        endpointAddress = ep.getAddress();
        return endpointAddress;
      }
    }
View Full Code Here

     * @return The service endpoint, or null if the endpoint is not found.
     */
    public static Endpoint getServiceEndpoint(String endpointName, String contextName) {
        SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
        EndpointRegistryFactory factory =  spiProv.getSPI(EndpointRegistryFactory.class);
        EndpointRegistry registry = factory.getEndpointRegistry();
        Set<ObjectName> objectNames = registry.getEndpoints();

        for (ObjectName objectName : objectNames) {
            String context = objectName.getKeyProperty(Endpoint.SEPID_PROPERTY_CONTEXT);
            String endpoint = objectName.getKeyProperty(Endpoint.SEPID_PROPERTY_ENDPOINT);

            if ((contextName != null
                && context != null && context.equals(contextName)
                && endpoint != null && endpoint.equals(endpointName))
                || (contextName == null
                    && endpoint != null && endpoint.equals(endpointName))) {
                return registry.getEndpoint(objectName);
            }
        }
        return null;
    }
View Full Code Here

     * @return The service endpoint, or null if the endpoint is not found.
     */
    public static Endpoint getDeploymentEndpoint(String endpointName) {
        SPIProvider spiProv = SPIProviderResolver.getInstance().getProvider();
        EndpointRegistryFactory factory =  spiProv.getSPI(EndpointRegistryFactory.class);
        EndpointRegistry registry = factory.getEndpointRegistry();
        Set<ObjectName> objectNames = registry.getEndpoints();

        for (ObjectName objectName : objectNames) {
            if (objectName.toString().equals(endpointName)) {
                return registry.getEndpoint(objectName);
            }
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jboss.wsf.spi.management.EndpointRegistry

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.