|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.mpg.mpiz_koeln.featureClient.FeatureClient
public class FeatureClient
It features several things:
Nested Class Summary | |
---|---|
static class |
FeatureClient.JobIdentifier
|
Constructor Summary | |
---|---|
FeatureClient()
Creates a new FeatureClient instance default the central in Canada. |
|
FeatureClient(Central central)
Creates a new FeatureClient instance with the given moby central and the default timeout of 20s. |
|
FeatureClient(Central central,
long timeout)
Creates a new FeatureClient instance with the given moby central and a given timeout. |
Method Summary | ||
---|---|---|
void |
add2Filter(Collection<String> services)
Adds the services to the filter list. |
|
void |
add2Filter(String... services)
Adds a list of service names to the filter. |
|
void |
addMultipleCallInput(FeatureClient.JobIdentifier jobIdentifier,
MobyObject... inputs)
Adds one or more input(s) to the client which are used to call services once or more. |
|
void |
addMultipleCallInput(FeatureClient.JobIdentifier identifier,
String id)
|
|
void |
addMultipleCallInput(FeatureClient.JobIdentifier identifier,
String namespace,
String id)
|
|
void |
addMultipleCallInput(FeatureClient.JobIdentifier identifier,
String namespace,
String id,
String name)
|
|
void |
addMultipleCallInput(String id)
|
|
void |
addMultipleCallInput(String jobidentifier,
MobyObject... inputs)
|
|
void |
addMultipleCallInput(String namespace,
String id)
Adds a new simple input to the client. |
|
void |
addMultipleCallInput(String namespace,
String id,
String name)
Adds a new simple input to the client. |
|
void |
addOutput(String datatype)
Adds an output definition. |
|
void |
addOutput(String datatype,
String... namespaces)
Adds an output definition. |
|
void |
addSecondary(String name,
String value)
Adds a secondary (parameter) to the request. |
|
void |
addService(String name)
Adds a service name to the list of service which will be called. |
|
void |
addService(String auth,
String name)
Adds a service to the request. |
|
Collection<FeatureClientResult> |
call()
Calls one or several services (which are found by the find-service-procedure) and returns their results. |
|
Collection<FeatureClientResult> |
call(Collection<MobyService> services)
Calls all given services and returns their result. |
|
Collection<FeatureClientResult> |
call(MobyService mobyService)
Calls the moby service and returns its result. |
|
|
callServiceMultipleTimes()
Calls a service multiple times and returns it results. |
|
|
callWithMultipleResult()
Calls a service and returns the results of the service. |
|
|
callWithSingleResult()
Calls a service and returns the one result the service returns. |
|
void |
setAuthentication(String user,
String password)
Sets the user and the password for a possible authentification of a service. |
|
void |
setCentral(String url,
String uri)
Sets the central to be used. |
|
void |
setSingleCallInput(MobyObject... inputs)
Sets the inputs for a single service call. |
|
void |
setSingleCallInput(String namespace,
String id)
Sets the input for a single service call. |
|
void |
setSingleCallInput(String namespace,
String id,
String name)
Sets the input for a single service call. |
|
void |
setTimeout(long timeout)
Sets the timeout in seconds how long the call shall be kept alive. |
|
void |
setValidateServices(boolean validateServices)
Sets whether the services which will be called, shall be validated if they are working. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FeatureClient(Central central)
central
- the central to be usedpublic FeatureClient() throws MobyException
MobyException
public FeatureClient(Central central, long timeout)
central
- the central to usetimeout
- the timeout how long a service call is validMethod Detail |
---|
public void setValidateServices(boolean validateServices)
validateServices
- validate ?public void setCentral(String url, String uri) throws MobyException
url
- the endpoint of the centraluri
- the namespace of the central
MobyException
public Collection<FeatureClientResult> call(Collection<MobyService> services)
services
- list of services to be called
public <T> T callWithSingleResult() throws FeatureClientException
T
- the datatype which the service returns
FeatureClientException
- something happenedpublic <T> Collection<T> callWithMultipleResult() throws FeatureClientException
T
- the datatype which the service returns
FeatureClientException
public <T> Map<String,Collection<T>> callServiceMultipleTimes() throws FeatureClientException
T
- the datatype which the service returns
FeatureClientException
public Collection<FeatureClientResult> call() throws FeatureClientException
FeatureClientException
public Collection<FeatureClientResult> call(MobyService mobyService)
mobyService
- the service to be called
public void setSingleCallInput(String namespace, String id) throws FeatureClientException
namespace
- the namespace of the objectid
- the identifier of the object
FeatureClientException
public void setSingleCallInput(String namespace, String id, String name) throws FeatureClientException
namespace
- the namespace of the objectid
- the identifier of the objectname
- the article name of the object
FeatureClientException
public void setSingleCallInput(MobyObject... inputs) throws FeatureClientException
addMultipleCallInput(String, MobyObject...)
inputs
- the inputs for the service call
FeatureClientException
public void addMultipleCallInput(String id) throws FeatureClientException
FeatureClientException
public void addMultipleCallInput(FeatureClient.JobIdentifier identifier, String id) throws FeatureClientException
FeatureClientException
public void addMultipleCallInput(FeatureClient.JobIdentifier identifier, String namespace, String id) throws FeatureClientException
FeatureClientException
public void addMultipleCallInput(FeatureClient.JobIdentifier identifier, String namespace, String id, String name) throws FeatureClientException
FeatureClientException
public void addMultipleCallInput(String namespace, String id) throws FeatureClientException
namespace
- the namespace of the inputid
- the identifier of the input
FeatureClientException
public void addMultipleCallInput(String namespace, String id, String name) throws FeatureClientException
namespace
- the namespace of the objectid
- the identifier of the objectname
- the article name of the object
FeatureClientException
public void addMultipleCallInput(String jobidentifier, MobyObject... inputs) throws FeatureClientException
FeatureClientException
public void addMultipleCallInput(FeatureClient.JobIdentifier jobIdentifier, MobyObject... inputs) throws FeatureClientException
jobIdentifier
- an identifier to know later which service result was which inputinputs
- the service inputs of a service
FeatureClientException
public void addOutput(String datatype, String... namespaces)
datatype
- the data typenamespaces
- a list of namespacespublic void addOutput(String datatype)
addOutput(String, String...)
with data type and
null as parameters for namespaces. This is used when the data type does not require specific namespaces.
datatype
- the datatypepublic void setTimeout(long timeout)
timeout
- the timeout in secondspublic void addSecondary(String name, String value)
name
- the name of the secondaryvalue
- the value of the secondarypublic void add2Filter(String... services)
services
- service names to be removedpublic void add2Filter(Collection<String> services)
services
- the servicespublic void addService(String auth, String name)
auth
- the authority of the servicename
- the name of the servicepublic void addService(String name)
addService(String, String)
and to give also the
authority with the service name, as this method is not guaranteed to find and cache the correct service you might
look for !
name
- the service namepublic void setAuthentication(String user, String password)
user
- the userpassword
- his/her password
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |