public final class PipeConfig extends Object
| Constructor and Description |
|---|
PipeConfig(URL baseURL,
Class klass) |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationModule |
getAuthModule() |
AuthzModule |
getAuthzModule() |
URL |
getBaseURL() |
String |
getDataRoot()
Deprecated.
use
MarshallingConfig.getDataRoot() instead |
Charset |
getEncoding()
Deprecated.
Use
MarshallingConfig.getEncoding() instead |
String |
getEndpoint() |
com.google.gson.GsonBuilder |
getGsonBuilder()
Deprecated.
Pipes are moving to a more generic RequestBuilder interface.
GsonRequestBuilder |
PipeHandler |
getHandler() |
String |
getName() |
PageConfig |
getPageConfig()
PageConfig is the configuration information for Paging.
|
RequestBuilder |
getRequestBuilder()
A request builder is responsible for turning an object into a request
used in a Pipe's save methods.
|
ResponseParser |
getResponseParser()
A ResponseParser is responsible for parsing a String value of the
response from a remote source into a object instance.
|
Integer |
getTimeout()
Timeout is the length of time in milliseconds that a Pipe will wait for a
response from a call to read, save or remove
|
PipeType |
getType() |
void |
setAuthModule(AuthenticationModule authModule)
This value must be set to use Authentication in Pipes build from this
config.
|
void |
setAuthzModule(AuthzModule authzModule) |
void |
setBaseURL(URL baseURL)
Change the URL which Endpoints are appended to.
|
void |
setDataRoot(String dataRoot)
Deprecated.
use
MarshallingConfig.setDataRoot(java.lang.String) instead |
void |
setEncoding(Charset encoding)
Deprecated.
|
void |
setEncoding(String charsetName)
Deprecated.
|
void |
setEndpoint(String endpoint)
Change the string appended to BaseURL.
|
void |
setGsonBuilder(com.google.gson.GsonBuilder gsonBuilder)
Deprecated.
Pipes are moving to a more generic RequestBuilder interface.
GsonRequestBuilder |
void |
setHandler(PipeHandler handler) |
void |
setName(String name)
Modify the name field.
|
void |
setPageConfig(PageConfig pageConfig)
PageConfig is the configuration information for Paging.
|
void |
setRequestBuilder(RequestBuilder requestBuilder)
A request builder is responsible for turning an object into a request
used in a Pipe's save methods.
|
void |
setResponseParser(ResponseParser responseParser)
A ResponseParser is responsible for parsing a String value of the
response from a remote source into a object instance.
|
void |
setTimeout(Integer timeout)
Timeout is the length of time in milliseconds that a Pipe will wait for a
response from a call to read, save or remove
|
void |
setType(PipeType type) |
public String getName()
public void setName(String name)
name - the name of this pipepublic URL getBaseURL()
public void setBaseURL(URL baseURL)
baseURL - the URL which Endpoints are appended to.public String getEndpoint()
public void setEndpoint(String endpoint)
endpoint - the new endpoint namepublic void setType(PipeType type)
type - a PipeType to use when building a Pipe with this config.PipeTypespublic com.google.gson.GsonBuilder getGsonBuilder()
GsonRequestBuilderIllegalStateException - if ResponseBuilder is not an instance of
GsonResponseParser@Deprecated public void setGsonBuilder(com.google.gson.GsonBuilder gsonBuilder)
GsonRequestBuildergsonBuilder - GSONBuilder which will be used to generate GSON
objects to be used by Pipes with this config.IllegalStateException - if ResponseBuilder is not an instance of
GsonResponseParserpublic AuthenticationModule getAuthModule()
AuthenticationModule which will be used for
Authentication.public void setAuthModule(AuthenticationModule authModule)
authModule - a AuthenticationModule which works with this
PipeConfig@Deprecated public Charset getEncoding()
MarshallingConfig.getEncoding() instead@Deprecated public void setEncoding(Charset encoding)
MarshallingConfig.setEncoding(java.nio.charset.Charset)} insteadencoding - a not null encodingIllegalArgumentException - if encoding is null@Deprecated public void setEncoding(String charsetName)
MarshallingConfig.setEncoding(java.nio.charset.Charset)} insteadcharsetName - a string for the encoding to be usedUnsupportedCharsetException - if charSet is not supportedpublic PageConfig getPageConfig()
the current pageconfigpublic void setPageConfig(PageConfig pageConfig)
pageConfig - a new pageconfigPageConfig@Deprecated public String getDataRoot()
MarshallingConfig.getDataRoot() instead
{
"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.@Deprecated public void setDataRoot(String dataRoot)
MarshallingConfig.setDataRoot(java.lang.String) instead
{
"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 - the new datarootpublic PipeHandler getHandler()
PipeHandler for Pipes build using this
configurationpublic void setHandler(PipeHandler handler)
handler - a new PipeHandler for Pipes build using this
configurationpublic Integer getTimeout()
public void setTimeout(Integer timeout)
timeout - a newpublic void setRequestBuilder(RequestBuilder requestBuilder)
GsonRequestBuilderrequestBuilder - a new request builderpublic RequestBuilder getRequestBuilder()
GsonRequestBuilderpublic ResponseParser getResponseParser()
public void setResponseParser(ResponseParser responseParser)
responseParser - the response parser to usepublic AuthzModule getAuthzModule()
public void setAuthzModule(AuthzModule authzModule)
Copyright © 2014 JBoss by Red Hat. All rights reserved.