public class ClientCommunication
extends java.lang.Object
Constructor and Description |
---|
ClientCommunication(java.lang.String url,
java.lang.String username,
java.lang.String password,
java.net.Proxy proxy)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
<T> T |
getService(java.lang.Class<T> serviceClass)
Returns a service communication proxy for the specified class.
|
<T> T |
getService(java.lang.Class<T> serviceClass,
java.lang.ClassLoader classLoader)
Returns a service communication proxy for the specified class.
|
void |
validate()
This method validates the connection.
|
void |
validateServerRoot()
This method validates if the server HTTP root is available.
|
public ClientCommunication(java.lang.String url, java.lang.String username, java.lang.String password, java.net.Proxy proxy)
url
- the LSPS server urlusername
- password
- proxy
- java.lang.IllegalArgumentException
- if the url is not well-formed or the protocol is not http nor httpsjava.lang.NullPointerException
- if the url
or the username
or the password
is nullpublic <T> T getService(java.lang.Class<T> serviceClass)
T
- the service classserviceClass
- the service classjava.lang.NullPointerException
- if any of the arguments is nullpublic <T> T getService(java.lang.Class<T> serviceClass, java.lang.ClassLoader classLoader)
T
- the service classserviceClass
- the service classclassLoader
- the class-loader to serialize and deserialize classesjava.lang.NullPointerException
- if any of the arguments is nullpublic void validate()
CommunicationException
- if any error occurspublic void validateServerRoot()
CommunicationException
- if any error occursCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.