All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openstack4j.openstack.senlin.internal.SenlinEventServiceImpl Maven / Gradle / Ivy

There is a newer version: 3.2.0
Show newest version
package org.openstack4j.openstack.senlin.internal;

import org.openstack4j.api.senlin.SenlinEventService;
import org.openstack4j.model.senlin.Event;
import org.openstack4j.openstack.senlin.domain.SenlinEvent;

import java.util.List;

import static com.google.common.base.Preconditions.checkNotNull;

/**
 * This class contains getters for all implementation of the available event services
 * 
 * @author lion
 */
public class SenlinEventServiceImpl extends BaseSenlinServices implements SenlinEventService {

	@Override
	public List list() {
		return get(SenlinEvent.Event.class, uri("/events")).execute().getList();
	}

	@Override
	public Event get(String eventID) {
		checkNotNull(eventID);
		return get(SenlinEvent.class, uri("/events/%s", eventID)).execute();
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy