T
- the real type of authenticationpublic abstract class Connection<T extends Authentication> extends Object implements Loggable, Serializable
Constructor and Description |
---|
Connection(Class<? extends Authentication> clazz)
Create a new instance of Connection
|
Modifier and Type | Method and Description |
---|---|
T |
connect(String url)
Connect to the service with given url.
|
static String |
getNetworkInterfaceFor(String url)
Selects a network interface for proactive runtime based on provided url.
|
static URI |
normalize(String url)
Normalize the URL
url . |
T |
waitAndConnect(String url)
Connects to the service using given URL.
|
T |
waitAndConnect(String url,
long timeout)
Connects to the service with a specified timeout value.
|
public Connection(Class<? extends Authentication> clazz)
clazz
- the real type of the authenticationpublic T connect(String url) throws Exception
url
- the URL of the service to join.Exception
- if something wrong appendpublic T waitAndConnect(String url) throws Exception
url
- the url on which to connectException
- if something wrong appendpublic T waitAndConnect(String url, long timeout) throws Exception
url
- the url on which to connecttimeout
- the maximum amount of time to wait if it cannot connectException
- if something wrong appendpublic static URI normalize(String url)
url
.url,
- the URL to normalize.RemoteObjectFactory
public static String getNetworkInterfaceFor(String url) throws IOException, URISyntaxException
IOException
- if an I/O error occurs when creating the socket.UnknownHostException
- if the IP address of the host could not be determined.URISyntaxException
- if the given string violates RFC 2396,