
com.hazelcast.spi.impl.servicemanager.ServiceManager Maven / Gradle / Ivy
/*
* Copyright (c) 2008-2016, Hazelcast, Inc. All Rights Reserved.
*
* 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.hazelcast.spi.impl.servicemanager;
import com.hazelcast.spi.SharedService;
import java.util.List;
/**
* Responsible for managing services.
*/
public interface ServiceManager {
/**
* Gets the ServiceInfo for a service by serviceName.
*
* @param serviceName the name of the service.
* @return the found ServiceInfo or null if nothing is found.
*/
ServiceInfo getServiceInfo(String serviceName);
/**
* Gets all the service info's for services that implement a given class/interface.
*
* @param serviceClass the class/interface the service should implement.
* @return a List of the found ServiceInfo. List will be empty if nothing is found.
*/
List getServiceInfos(Class serviceClass);
/**
* Gets a Service by serviceName.
*
* @param serviceName the name of the service.
* @param
* @return the found service or null if nothing is found.
*/
T getService(String serviceName);
/**
* Gets all services implementing a certain class/interface.
*
* CoreServices will be placed at the beginning of the list.
*
* @param serviceClass the class/interface to check for.
* @param
* @return the found services.
*/
List getServices(Class serviceClass);
/**
* Gets a SharedService by serviceName.
*
* @param serviceName the name of the SharedService.
* @param
* @return the found SharedService or null if not found.
* @throws IllegalArgumentException if a service with the name is found, but isn't a SharedService.
*/
T getSharedService(String serviceName);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy