|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.biomoby.client.MobyServiceLocator
public class MobyServiceLocator
A container for information how to reach a Biomoby service.
Normally, a Biomoby service is sufficiently defined by its URL
(endpoint) and by its name (which is used as a method name on that
URL). See getService()
.
Sometimes, however, the service URL is not (yet) available, so a
client has to go to a BioMoby registry and fetch it. The locator
can provide, therefore, information about a registry. See getRegistryEndpoint()
and getRegistryNamespace()
.
Constructor Summary | |
---|---|
MobyServiceLocator()
Default constructor. |
|
MobyServiceLocator(MobyService service)
Another constructor, seeting also a service. |
Method Summary | |
---|---|
String |
getPassword()
Returns the password for the authentication |
String |
getRegistryEndpoint()
|
String |
getRegistryNamespace()
|
MobyService |
getService()
|
int |
getSuggestedTimeout()
|
String |
getUser()
Returns the user for the authentication |
boolean |
hasAuthentication()
Returns true if the user AND the password is set |
boolean |
isAsBytes()
Return the current setting - see setAsBytes(boolean) . |
void |
setAsBytes(boolean enabled)
Biomoby API requested that a service must accept input data either as a String, or as an byte array. |
void |
setPassword(String password)
Sets the password for authentication |
void |
setRegistryEndpoint(String value)
|
void |
setRegistryNamespace(String value)
|
void |
setService(MobyService service)
|
void |
setSuggestedTimeout(int timeout)
Set a timeout that will be used when calling the service. |
void |
setUser(String user)
Sets the user for authentication |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MobyServiceLocator()
public MobyServiceLocator(MobyService service)
Method Detail |
---|
public MobyService getService()
public void setService(MobyService service)
public String getRegistryEndpoint()
public void setRegistryEndpoint(String value)
public String getRegistryNamespace()
public void setRegistryNamespace(String value)
public int getSuggestedTimeout()
public void setSuggestedTimeout(int timeout)
Note, however, that disabling timeout in the client does not mean that the call cannot time-out: there are other players on the way to the services and back that can cause time-outing (proxies, web server, servlet container, etc.).
timeout
- suggested timeout in milliseconds; zero or a
negative value means to disable timeoutpublic boolean isAsBytes()
setAsBytes(boolean)
.
public void setAsBytes(boolean enabled)
enabled
- if true the data will be sent to the service as
byte arraypublic void setUser(String user)
user
- public void setPassword(String password)
password
- public String getUser()
public String getPassword()
public boolean hasAuthentication()
|
Version: 1.1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |