public abstract class MultiIPDiscovery extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_TIMEOUT |
Constructor and Description |
---|
MultiIPDiscovery() |
Modifier and Type | Method and Description |
---|---|
protected int |
getDefaultUnicastSocketTimeout() |
UnicastResponse |
getResponse(String host,
int port,
InvocationConstraints constraints) |
private UnicastResponse |
getSingleResponse(String host,
long connectionTimeout,
int port,
DiscoveryConstraints dc,
Discovery disco) |
private long |
getTimeout(long deadline) |
protected abstract UnicastResponse |
performDiscovery(Discovery disco,
DiscoveryConstraints dc,
Socket s) |
protected void |
singleResponseException(Exception ex,
InetAddress addr,
int port) |
protected void |
socketCloseException(IOException ex) |
public static final int DEFAULT_TIMEOUT
public UnicastResponse getResponse(String host, int port, InvocationConstraints constraints) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
private long getTimeout(long deadline) throws SocketTimeoutException
SocketTimeoutException
private UnicastResponse getSingleResponse(String host, long connectionTimeout, int port, DiscoveryConstraints dc, Discovery disco) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
protected int getDefaultUnicastSocketTimeout()
protected void singleResponseException(Exception ex, InetAddress addr, int port)
protected void socketCloseException(IOException ex)
protected abstract UnicastResponse performDiscovery(Discovery disco, DiscoveryConstraints dc, Socket s) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
Copyright 2007-2013, multiple authors.
Licensed under the Apache License, Version 2.0, see the NOTICE file for attributions.