Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright 2015 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.client;
 
 import java.util.List;
 import java.util.Map;
 
The interface is used for hiding the complexity of how client makes HTTP requests to the directory server.

Since:
1.2
 
 public interface DirectoryServiceClient {
    
    
Register a ServiceInstance.

Parameters:
instance the ProvidedServiceInstance.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
 
     void registerInstance(ProvidedServiceInstance instance);

    
Update a ServiceInstance.

Deprecated:
As of release 1.2, replaced by updateInstanceMetadata(java.lang.String,java.lang.String,java.util.Map,boolean)
Parameters:
instance the ProvidedServiceInstance.
 
     @Deprecated
     void updateInstance(ProvidedServiceInstance instance);

    
Update the ServiceInstance OperationalStatus by serviceName and instanceAddress.

Parameters:
serviceName the service name.
instanceAddress The IP address or FQDN that the instance is running on.
status the ServiceInstance OperationalStatus.
isOwned whether the DirectoryAPI owns this ServiceProvider.
 
     void updateInstanceStatus(String serviceNameString instanceAddressOperationalStatus statusboolean isOwned);

    
Update the ServiceInstance attribute "uri".

Parameters:
serviceName the service name.
instanceAddress The IP address or FQDN that the instance is running on.
uri the ServiceInstance URI.
isOwned whether the DirectoryAPI owns this ServiceProvider.
 
     void updateInstanceUri(String serviceNameString instanceAddressString uriboolean isOwned);

    
Update the ServiceInstance metadata.

Parameters:
serviceName the service name.
instanceAddress The IP address or FQDN that the instance is running on.
metadata the ServiceInstance metadata.
isOwned whether the DirectoryAPI owns this ServiceProvider.
 
     void updateInstanceMetadata(String serviceNameString instanceAddressMap<StringStringmetadataboolean isOwned);

    
Unregister a ServiceInstance.

Parameters:
serviceName service name.
instanceAddress The IP address or FQDN that the instance is running on.
isOwned whether the DirectoryAPI owns this ServiceProvider.
    void unregisterInstance(String serviceNameString instanceAddressboolean isOwned);

    
Send ServiceInstance heartbeats.

Parameters:
heartbeatMap the ServiceInstances heartbeat Map.
Lookup a Service by serviceName.

Parameters:
serviceName the service name.
Returns:
the ModelService.
    ModelService lookupService(String serviceName);

    
Get all service instances.

Returns:
the ModelServiceInstance list.
Get the changed services list.

Deprecated:
As of release 1.2, replaced by lookupChangesSince(java.lang.String,long)
Parameters:
services the Service list.
Returns:
the list of Services that have been changed.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
    @Deprecated
Get ModelMetadataKey, which is an object holding a list of service instances that contain the key name in the service metadata.

Parameters:
keyName the key name.
Returns:
the ModelMetadataKey.
    ModelMetadataKey getMetadataKey(String keyName);

    
Get the changed services list.

Parameters:
serviceName the service name
since the time in long when the service was last changed
Returns:
the list of Services that have been changed.
Throws:
com.cisco.oss.foundation.directory.exception.ServiceException
New to GrepCode? Check out our FAQ X