danielpassos
11/6/2012 - 1:28 AM

How To Use Pipe

How To Use Pipe

How To Use Pipe


Model: Data
Name: data
URL: http://myServer/myProject/data

Pipeline pipeline = new Pipeline("http://myServer/myProject");
Pipe<Data> myPipe = pipeline.pipe(Data.class); 

or

Pipeline pipeline = new Pipeline("http://myServer/myProject");
pipeline.pipe(Data.class); 

Pipe<Data> myPipe = pipeline.get("data");

Model: MyCrazyModel
Name: bad name
URL: http://myServer/myProject/mycrazymodel

Pipeline pipeline = new Pipeline("http://myServer/myProject");
PipeConfig pipeConfig = new PipeConfig("http://myServer/myProject")
pipeConfig.setName("bad name")

Pipe<MyCrazyModel> myPipe = pipeline.pipe(MyCrazyModel.class, pipeConfig); 

or

Pipeline pipeline = new Pipeline("http://myServer/myProject");

PipeConfig pipeConfig = new PipeConfig("http://myServer/myProject")
pipeConfig.setName("bad name")
pipeline.pipe(MyCrazyModel.class, pipeConfig); 

Pipe<MyCrazyModel> myPipe = pipeline.get("bad name");

Model: LoremIpsum
Name: Long and descriptive name
URL: http://myServer/myProject/li

Pipeline pipeline = new Pipeline("http://myServer/myProject");
PipeConfig pipeConfig = new PipeConfig("http://myServer/myProject")
pipeConfig.setName("Long and descriptive name")
pipeConfig.setEndpoint("li")

Pipe<LoremIpsum> myPipe = pipeline.pipe(LoremIpsum.class, pipeConfig); 

or

Pipeline pipeline = new Pipeline("http://myServer/myProject");

PipeConfig pipeConfig = new PipeConfig("http://myServer/myProject")
pipeConfig.setName("Long and descriptive name")
pipeConfig.setEndpoint("li")
pipeline.pipe(LoremIpsum.class, pipeConfig); 

Pipe<LoremIpsum> myPipe = pipeline.get("Long and descriptive name");