public class SmsPinger extends Object
SmsPinger class.
Constructor and Description |
---|
SmsPinger() |
Modifier and Type | Method and Description |
---|---|
static void |
initialize()
Initializes this singleton
|
static Long |
ping(String host)
Ping a remote host, using the default number of retries and timeouts.
|
static Long |
ping(String phoneNumber,
long timeout,
int retries)
This method is used to ping a remote host to test for ICMP support.
|
static void |
ping(String phoneNumber,
long timeout,
int retries,
PingResponseCallback cb)
ping
|
static void |
setSmsPingTracker(SmsPingTracker pingTracker)
setSmsPingTracker
|
public static void initialize() throws IOException
IOException
- if any.public static void setSmsPingTracker(SmsPingTracker pingTracker)
setSmsPingTracker
pingTracker
- a SmsPingTracker
object.public static void ping(String phoneNumber, long timeout, int retries, PingResponseCallback cb) throws Exception
ping
phoneNumber
- a String
object.timeout
- a long.retries
- a int.cb
- a PingResponseCallback
object.Exception
- if any.public static Long ping(String phoneNumber, long timeout, int retries) throws InterruptedException, Exception
phoneNumber
- The address to poll.timeout
- The time to wait between each retry.retries
- The number of times to retryInterruptedException
- if any.IOException
- if any.Exception
- if any.public static Long ping(String host) throws Exception, InterruptedException
host
- the host to pingIOException
- if any.InterruptedException
- if any.Exception
- if any.Copyright © 2015. All Rights Reserved.