
org.specrunner.pipeline.IChannel Maven / Gradle / Ivy
/*
SpecRunner - Acceptance Test Driven Development Tool
Copyright (C) 2011-2018 Thiago Santos
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see
*/
package org.specrunner.pipeline;
import java.util.Map;
/**
* Abstraction of a channel where information can be obtained from and written
* to.
*
* @author Thiago Santos
*
*/
public interface IChannel extends Map {
/**
* Add data to the channel.
*
* @param key
* The data key.
* @param value
* The data value.
* @return The channel itself.
*/
IChannel add(String key, Object value);
/**
* @param
* The expected type.
* @param key
* The object name.
* @param type
* The object type.
* @return The object instance.
* @throws NotFoundException
* If key is not present.
* @throws InvalidTypeException
* If type does not match.
*/
T get(String key, Class type) throws NotFoundException, InvalidTypeException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy