public final class PipeConfig extends Object
| Constructor and Description |
|---|
PipeConfig(URL baseURL,
Class klass) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationModule |
getAuthModule() |
URL |
getBaseURL() |
String |
getDataRoot()
DataRoot refers to the dotted location of the result we are interested in
from the JSON response from the server.
|
Charset |
getEncoding()
The Encoding is the String encoding to expect from the server.
|
String |
getEndpoint() |
com.google.gson.GsonBuilder |
getGsonBuilder() |
PipeHandler |
getHandler() |
String |
getName() |
PageConfig |
getPageConfig()
PageConfig is the configuration information for Paging.
|
PipeType |
getType() |
void |
setAuthModule(AuthenticationModule authModule)
This value must be set to use Authentication in Pipes build from this
config.
|
void |
setBaseURL(URL baseURL)
Change the URL which Endpoints are appended to.
|
void |
setDataRoot(String dataRoot)
DataRoot refers to the dotted location of the result we are interested in
from the JSON response from the server.
|
void |
setEncoding(Charset encoding) |
void |
setEncoding(String charsetName) |
void |
setEndpoint(String endpoint)
Change the string appended to BaseURL.
|
void |
setGsonBuilder(com.google.gson.GsonBuilder gsonBuilder) |
void |
setHandler(PipeHandler handler) |
void |
setName(String name)
Modify the name field.
|
void |
setPageConfig(PageConfig pageConfig)
PageConfig is the configuration information for Paging.
|
void |
setType(PipeType type) |
public String getName()
public void setName(String name)
name - public URL getBaseURL()
public void setBaseURL(URL baseURL)
baseURL - public String getEndpoint()
public void setEndpoint(String endpoint)
endpoint - public void setType(PipeType type)
type - a PipeType to use when building a Pipe with this config.PipeTypespublic com.google.gson.GsonBuilder getGsonBuilder()
public void setGsonBuilder(com.google.gson.GsonBuilder gsonBuilder)
gsonBuilder - GSONBuilder which will be used to generate GSON
objects to be used by Pipes with this config.public AuthenticationModule getAuthModule()
AuthenticationModule which will be used for
Authentication.public void setAuthModule(AuthenticationModule authModule)
authModule - a AuthenticationModule which works with this
PipeConfigpublic Charset getEncoding()
public void setEncoding(Charset encoding)
encoding - a not null encodingIllegalArgumentException - if encoding is nullpublic void setEncoding(String charsetName)
charsetName - a string for the encoding to be usedUnsupportedCharsetException - if charSet is not supportedpublic PageConfig getPageConfig()
PageConfigpublic void setPageConfig(PageConfig pageConfig)
pageConfig - PageConfigpublic String getDataRoot()
{
"speakers": {
"data": [
{"speakerName":"John Doe", "speakerid":42},
{"speakerName":"Jesse James", "speakerid":5309},
]
}
}
A DataRoot of "speakers.data" would make the pipe pass a List using the
array of speakers to the onSuccess method of callback.public void setDataRoot(String dataRoot)
{
"speakers": {
"data": [
{"speakerName":"John Doe", "speakerid":42},
{"speakerName":"Jesse James", "speakerid":5309},
]
}
}
A DataRoot of "speakers.data" would make the pipe pass a List using the
array of speakers to the onSuccess method of callback.dataRoot - public PipeHandler getHandler()
PipeHandler for Pipes build using this configurationpublic void setHandler(PipeHandler handler)
handler - a new PipeHandler for Pipes build using this configurationCopyright © 2013 JBoss, a division of Red Hat, Inc.. All Rights Reserved.