// empty pipeline:
AGPipeline* myPipeline = [[AGPipeline alloc] init];
// create a new pipe, by applying some PIPE OPTIONS:
id<AGPipe> myPipe =
[myPipeline newPipe:PIPE_NAME, @"my pipe", PIPE_TYPE, @"REST",
PIPE_BASE_URL, [NSURL URLWithString:@"http://api.server.com/context/"],
nil]; // termination of options with nil
The AGPipeline API would look like:
@interface AGPipeline : NSObject
/**
* Returns the AGPipe, which is created using AGPipeOptions
*
* @return the new AGPipe object
*/
-(id<AGPipe>) newPipe:(AGPipeOption*) firstOption, ...;
/**
* Removes a pipe from the AGPipeline object
*
* @param name the name of the actual pipe
*
* @return the new created AGPipe object
*/
-(id<AGPipe>) remove:(NSString*) name;
/**
* Look up for a pipe object.
*
* @param name the name of the actual pipe
*
* @return the new created AGPipe object
*/
-(id<AGPipe>) get:(NSString*) name;
@end