For the pipeline, the basic functionality is:
@interface AGPipeline : NSObject
// class factory methods to create the pipeline object
+(id) pipelineWithPipe:(NSString*) pipe;
+(id) pipelineWithPipes:(NSString*) pipe, ...;
//TODO: define factory method to create a pipeline w/ config object (can be an NSDictionary...)
// pipeline object methods
-(id<AGPipe>) add:(NSString*) pipe;
-(id<AGPipe>) remove:(NSString*) pipe;
-(id<AGPipe>) get:(NSString*) pipe;
@end
For the actual pipe objects:
@protocol AGPipe <NSObject>
-(NSArray*) read;
-(NSArray*) readWithFilter:(id)filterObject;
// for REST adapter the RETURN value can be an NSDictionary (returned from AFNetworking)...
-(id) save:(NSArray*) object;
-(id) remove:(int) id;
@end
The different adapters (e.g. rest adapter) are than implementing the 'pipe' functionality:
@interface AGRestAdapter : NSObject <AGPipe>
@end