Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2014 Cisco Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
 
 
 
 
 
 package com.cisco.oss.foundation.directory;
 
 import java.util.Map;
 
The service registration lifecycle management interface. This interface is intended for the service provider to register/update/unregister a ProvidedServiceInstance.
 
 public interface RegistrationManager extends AutoCloseable {

    
Register a new ProvidedServiceInstance. Register a new ProvidedServiceInstance to Service Directory.

Parameters:
serviceInstance The ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     public void registerService(ProvidedServiceInstance serviceInstancethrows ServiceException;

    
Register a new ProviderServiceInstance with ServiceInstanceHealth. It registers a new ProviderServiceInstance and attaches a ServiceInstanceHealth callback. Directory server will invoke ServiceInstanceHealth periodically to update the OperationalStatus of the ProviderServiceInstance on behalf of the Service Provider.

Parameters:
serviceInstance The ProvidedServiceInstance.
registryHealth The ServiceInstanceHealth.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     public void registerService(ProvidedServiceInstance serviceInstanceServiceInstanceHealth registryHealththrows ServiceException;

    
Update the OperationalStatus of the ProvidedServiceInstance. It is a convenient method to update the OperationalStatus of the ProvidedServiceInstance.

Parameters:
serviceName The name of the service.
providerAddress The IP address or FQDN that the instance is running on.
status The OperationalStatus of the ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     public void updateServiceOperationalStatus(String serviceNameString providerAddressOperationalStatus statusthrows ServiceException;

    
Update the uri attribute of the ProvidedServiceInstance. It is a convenient method to update the uri attribute of the ProvidedServiceInstance.

Parameters:
serviceName The name of the service.
providerAddress The IP address or FQDN that the instance is running on.
uri The URI of the ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     public void updateServiceUri(String serviceNameString providerAddressString urithrows ServiceException;

    
Update the metadata of the ProvidedServiceInstance. It is a convenient method to update the metadata attribute of the ProvidedServiceInstance.

Parameters:
serviceName The name of the service.
providerAddress The IP address or FQDN that the instance is running on.
metadata The metadata map of the ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     public void updateServiceMetadata(String serviceNameString providerAddressMap<StringStringmetadatathrows ServiceException;

    
Update the ProvidedServiceInstance. Update the existing ProvidedServiceInstance. The metadata Map in the ProvidedServiceInstance will not be updated when it is null. Replaced by updateServiceMetadata(java.lang.String,java.lang.String,java.util.Map)

Parameters:
serviceInstance The ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
    @Deprecated
    public void updateService(ProvidedServiceInstance serviceInstancethrows ServiceException;

    
Unregister the ProvidedServiceInstance. Unregister an existing ProvidedServiceInstance in the directory server.

Parameters:
serviceName The name of the Service.
providerAddress The IP address or FQDN that the instance is running on.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
    public void unregisterService(String serviceNameString providerAddressthrows ServiceException;

    
close the registration Manager, This method is invoked automatically if using JDK7 try-with-resource

    @Override
    void close() throws ServiceException;
New to GrepCode? Check out our FAQ X