org.specrunner.pipeline
Interface IChannel

All Superinterfaces:
Map<String,Object>
All Known Implementing Classes:
ChannelImpl

public interface IChannel
extends Map<String,Object>

Abstraction of a channel where information can be obtained from and written to.

Author:
Thiago Santos

Nested Class Summary
 
Nested classes/interfaces inherited from interface java.util.Map
Map.Entry<K,V>
 
Method Summary
 IChannel add(String key, Object value)
          Add data to the channel.
<T> T
get(String key, Class<T> type)
           
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Method Detail

add

IChannel add(String key,
             Object value)
Add data to the channel.

Parameters:
key - The data key.
value - The data value.
Returns:
The channel itself.

get

<T> T get(String key,
          Class<T> type)
      throws NotFoundException,
             InvalidTypeException
Type Parameters:
T - The expected type.
Parameters:
key - The object name.
type - The object type.
Returns:
The object instance.
Throws:
NotFoundException - If key is not present.
InvalidTypeException - If type does not match.


Copyright © 2014. All rights reserved.