Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2006, Red Hat Middleware LLC, and individual contributors
   * as indicated by the @author tags. 
   * See the copyright.txt in the distribution for a full listing 
   * of individual contributors.
   * This copyrighted material is made available to anyone wishing to use,
   * modify, copy, or redistribute it subject to the terms and conditions
   * of the GNU Lesser General Public License, v. 2.1.
  * This program is distributed in the hope that it will be useful, but WITHOUT A
  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
  * PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more details.
  * You should have received a copy of the GNU Lesser General Public License,
  * v.2.1 along with this distribution; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
  * MA  02110-1301, USA.
  * 
  * (C) 2005-2006,
  * @author JBoss Inc.
  */
 package com.arjuna.webservices11;
 
 import java.util.Map;
The registry of WS service providers for the WS-C and WS-T services.

Author(s):
kevin
 
 public class ServiceRegistry
 {
    
The registry singleton.
 
     private static final ServiceRegistry REGISTRY = new ServiceRegistry() ;

    
The SOAP service provider registry.
 
     private final Map<StringStringserviceProviderRegistry = new TreeMap<StringString>() ;

    
The secure SOAP service provider registry.
 
     private final Map<StringStringsecureServiceProviderRegistry = new TreeMap<StringString>() ;

    
Get the service registry.

Returns:
The service registry.
 
     public static ServiceRegistry getRegistry()
     {
         return  ;
     }

    
Register the specified service.

Parameters:
serviceName The service name.
url The service url.
 
     public void registerServiceProvider(final String serviceNamefinal String url)
     {
         synchronized()
         {
             .put(serviceNameurl) ;
         }
     }

    
Register the specified secure service.

Parameters:
serviceName The secure service name.
url The service url.
 
     public void registerSecureServiceProvider(final String serviceNamefinal String url)
     {
         synchronized()
         {
             .put(serviceNameurl) ;
         }
     }

    
Remove the specified service.

Parameters:
serviceName The service name.
 
     public void removeServiceProvider(final String serviceName)
     {
         synchronized()
         {
             .remove(serviceName) ;
         }
     }

    
Remove the specified secure service.

Parameters:
serviceName The secure service name.
 
     public void removeSecureServiceProvider(final String serviceName)
     {
        synchronized()
        {
            .remove(serviceName) ;
        }
    }

    
Get the service URI.

Parameters:
serviceName The service name.
Returns:
The service URI or null if not registered.
    public String getServiceURI(final String serviceName)
    {
        String uri;
        synchronized()
        {
            uri = .get(serviceName) ;
        }
        return uri;
    }

    
Get the secure service URI.

Parameters:
serviceName The secure service name.
Returns:
The secure service URI or null if not registered.
    public String getSecureServiceURI(final String serviceName)
    {
        String uri;
        synchronized()
        {
            uri = .get(serviceName) ;
        }
        return uri;
    }

    
Get the service URI.

Parameters:
serviceName The service name.
isSecure true if the secure service URL is required false if the normal service URL is required
Returns:
The service URI or null if not registered.
    public String getServiceURI(final String serviceNameboolean isSecure)
    {
        if (isSecure) {
            return getSecureServiceURI(serviceName);
        } else {
            return getServiceURI(serviceName);
        }
    }
New to GrepCode? Check out our FAQ X