com.jpackages.jdun
Class DialUpManager

java.lang.Object
  extended by com.jpackages.jdun.DialUpManager

public class DialUpManager
extends java.lang.Object

This class provides Dial-up Networking functionality for windows operating systems.

In order for this class to function properly, jdun98.dll, jdun2k.dll, and jdunxp.dll have to be on your application's library path. If it is not, you will receive a JDUNLibraryLoadFailedException. The easiest way to have it on a correct path is to put the DLL in the same directory as your jar or class files.

If JDUN is run on a non-windows OS, a JDUNLibraryLoadFailedException will be thrown and none of the DialUpManager methods will work.

An application should only have one instance of this class. If additional instances are made, only the last instance created will receive the callback notifications about the dialing state.

Example:
 try {
   // specify your registration key if you have purchased a registered version
   DialUpManager.setRegistrationKey("AAAA-BBBB-CCCC-DDDD-EEEE-FFFF");

   // define a DialUpManager for synchronous dialing
   DialUpManager dialUpManager = new DialUpManager();
   // get the first entry
   String entry = dialUpManager.getEntryNames()[0];
   // dial this entry
   int error = dialUpManager.dialEntrySynchronous(entry);
   if (error != 0)
     System.out.println("ERROR: " + dialUpManager.getErrorMessageForCode(error));
 }
 catch (LibraryLoadFailedException e) {
   if (e instanceof JDUNLibraryLoadFailedException)
     System.out.println("JDUN Library failed to load");
   else if (e instanceof RASLibraryLoadFailedException)
     System.out.println("RAS Library failed to load");
   System.exit(0);
 }
 

NOTE: Entry names are case sensitive.

NOTE: If your application terminates while a connection is being made but before it is completed, the given entry may become stuck in a connecting state. If this occurs, the entry will not function properly until the system is restarted. For this reason, it is important to not terminate your application prematurely when connecting.

Copyright (c) 2001-2007

Version:
1.9
Author:
JPackages.com

Constructor Summary
DialUpManager()
          Use this constructor if you do not want real-time feedback of the dialing state.
DialUpManager(DialingNotification dialingNotification)
          Use this constructor if you want real-time feedback of the dialing state.
 
Method Summary
 boolean createEntry(java.lang.String entryName)
          Creates a new dial-up entry with default properties.
 boolean createEntry(java.lang.String entryName, DialUpEntryProperties dialUpEntryProperties)
          Creates a new dial-up entry with the specified properties.
 boolean deleteEntry(java.lang.String entryName)
          Delete an entry.
 boolean dialEntryAsynchronous(java.lang.String entryName)
          Dials an entry asynchronously.
 boolean dialEntryAsynchronous(java.lang.String entryName, java.lang.String phoneNumber)
          Dials an entry asynchronously.
 boolean dialEntryAsynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password)
          Dials an entry asynchronously.
 boolean dialEntryAsynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password, java.lang.String domain)
          Dials an entry asynchronously.
 boolean dialEntryAsynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password, java.lang.String domain, java.lang.String phoneNumber)
          Dials an entry asynchronously.
 int dialEntrySynchronous(java.lang.String entryName)
          Dials an entry synchronously.
 int dialEntrySynchronous(java.lang.String entryName, java.lang.String phoneNumber)
          Dials an entry synchronously.
 int dialEntrySynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password)
          Dials an entry synchronously.
 int dialEntrySynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password, java.lang.String domain)
          Dials an entry synchronously.
 int dialEntrySynchronous(java.lang.String entryName, java.lang.String username, java.lang.String password, java.lang.String domain, java.lang.String phoneNumber)
          Dials an entry synchronously.
 java.lang.String dialNonEntryAsynchronous(java.lang.String phoneNumber, java.lang.String username, java.lang.String password)
          Dials a non-entry (simple connection) asynchronously.
 java.lang.String dialNonEntryAsynchronous(java.lang.String phoneNumber, java.lang.String username, java.lang.String password, java.lang.String domain)
          Dials a non-entry (simple connection) asynchronously.
 java.lang.String dialNonEntrySynchronous(java.lang.String phoneNumber, java.lang.String username, java.lang.String password)
          Dials a non-entry (simple connection) synchronously.
 java.lang.String dialNonEntrySynchronous(java.lang.String phoneNumber, java.lang.String username, java.lang.String password, java.lang.String domain)
          Dials a non-entry (simple connection) synchronously.
 void displayCreateEntryWindowAsynchronous()
          Displays the create new entry window asynchronously.
 void displayCreateEntryWindowSynchronous()
          Displays the create new entry window synchronously.
 void displayEditEntryWindowAsynchronous(java.lang.String entryName)
          Displays the edit entry window asynchronously.
 void displayEditEntryWindowSynchronous(java.lang.String entryName)
          Displays the edit entry window synchronously.
 java.lang.String getDefaultEntry()
          Get the name of the default entry.
 DialUpDevice getDialUpDevice(java.lang.String type)
          Retrieves the first dial-up device of a certain type it can find.
 DialUpDevice getDialUpDeviceModem()
          Retrieves the first modem dial-up device it can find.
 DialUpDevice[] getDialUpDevices()
          Retrieves all dial-up devices present on the computer.
 DialUpEntryProperties getDialUpEntryProperties(java.lang.String entryName)
          Retrieves the dial-up properties of an entry.
 int getEntryDialingState(java.lang.String entryName)
          Get the dialing state of a given entry.
 java.lang.String[] getEntryNames()
          Get all entry names.
 java.lang.String getErrorMessageForCode(int errorCode)
          Retrieve a String representation of an error code.
 java.lang.String getPassword(java.lang.String entryName)
          Retrieve the password of a given entry.
 java.lang.String getPPPIPAddress(java.lang.String entryName)
          Get the PPP IP address assigned to this computer from an entry connection.
 java.lang.String getPPPIPAddressForNonEntry(java.lang.String connectionID)
          Get the PPP IP address assigned to this computer from a non-entry connection.
 java.lang.String getPPPIPAddressServer(java.lang.String entryName)
          Get the PPP IP address of the server connected to via an entry.
 java.lang.String getPPPIPAddressServerForNonEntry(java.lang.String connectionID)
          Get the PPP IP address of the server connected to via a non-entry connection.
 long getStatisticDuration(java.lang.String entryName)
          Retrieve the duration of a connection for a given entry.
 long getStatisticReceived(java.lang.String entryName)
          Retrieve the number of bytes received for a connection of a given entry.
 long getStatisticTransmitted(java.lang.String entryName)
          Retrieve the number of bytes transmitted for a connection of a given entry.
 java.lang.String getUsername(java.lang.String entryName)
          Retrieve the username of a given entry.
 boolean hangUpEntry(java.lang.String entryName)
          Disconnect the connection for an entry.
 boolean hangUpNonEntry(java.lang.String connectionID)
          Disconnect the connection for a non-entry.
 boolean hasEntry(java.lang.String entryName)
          Determines if the entry exists.
 boolean isConnected()
          Determines if there are any active dial-up networking entry connections.
 boolean isEntryConnected(java.lang.String entryName)
          Determines if the entry is connected.
 boolean isInternetConnected()
          Determines if Windows believes there is internet available.
 boolean isNonEntryConnected(java.lang.String connectionID)
          Determines if the non-entry is connected.
 boolean renameEntry(java.lang.String oldEntryName, java.lang.String newEntryName)
          Rename an entry.
 boolean setDialUpEntryProperties(java.lang.String entryName, DialUpEntryProperties dialUpEntryProperties)
          Specifies the dial-up entry properties to use for the entry.
static void setRegistrationKey(java.lang.String key)
          When you purchase a registered version of JDUN, you must programmatically specify your registration key by passing it to this method.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialUpManager

public DialUpManager()
              throws LibraryLoadFailedException

Use this constructor if you do not want real-time feedback of the dialing state.

Throws:
LibraryLoadFailedException - A required library failed to load.

DialUpManager

public DialUpManager(DialingNotification dialingNotification)
              throws LibraryLoadFailedException

Use this constructor if you want real-time feedback of the dialing state. DialingNotification is an interface that defines the callback method for dialing.

Parameters:
dialingNotification - A class implementing this interface.
Throws:
LibraryLoadFailedException - A required library failed to load.
Method Detail

setRegistrationKey

public static final void setRegistrationKey(java.lang.String key)

When you purchase a registered version of JDUN, you must programmatically specify your registration key by passing it to this method.

This static method should be called before anything else is done with this API as follows:

 DialUpManager.setRegistrationKey("AAAA-BBBB-CCCC-DDDD-EEEE-FFFF");
 

Parameters:
key - JDUN Registration Key

getUsername

public java.lang.String getUsername(java.lang.String entryName)

Retrieve the username of a given entry.

Parameters:
entryName - The name of the entry.
Returns:
The username for this entry. If library load error, returns null.

getPassword

public java.lang.String getPassword(java.lang.String entryName)

Retrieve the password of a given entry.

For Windows 2000 and later versions, the password returned is not the actual password. Instead, it is a handle to the saved password. When connecting with this handle as the password, the actual password is retrieved and used.

Parameters:
entryName - The name of the entry.
Returns:
The password for this entry. If library load error, returns null.

isInternetConnected

public boolean isInternetConnected()

Determines if Windows believes there is internet available.

Returns:
true if internet present, false otherwise.

getEntryDialingState

public int getEntryDialingState(java.lang.String entryName)

Get the dialing state of a given entry.

Parameters:
entryName - The name of the entry.
Returns:
The dialing state of the given entry name. If library load error, returns -1.
See Also:
DialingState

getPPPIPAddress

public java.lang.String getPPPIPAddress(java.lang.String entryName)

Get the PPP IP address assigned to this computer from an entry connection.

Parameters:
entryName - The name of the entry.
Returns:
The local IP address assigned via this entry if one exists or a string equal to
  • CONNECTION_NOT_FOUND if the given entry does not have a current connection
  • IP_NOT_YET_AVAILABLE if the IP address is not yet available
    - The IP address is not available until the connection is complete
  • ERROR_CODE_XXX where XXX is the Windows system error code

getPPPIPAddressForNonEntry

public java.lang.String getPPPIPAddressForNonEntry(java.lang.String connectionID)

Get the PPP IP address assigned to this computer from a non-entry connection.

Parameters:
connectionID - The connection ID for this connection
Returns:
The local IP address assigned via this connection if one exists or a string equal to
  • CONNECTION_NOT_FOUND if the given entry does not have a current connection
  • IP_NOT_YET_AVAILABLE if the IP address is not yet available
    - The IP address is not available until the connection is complete
  • ERROR_CODE_XXX where XXX is the Windows system error code

getPPPIPAddressServer

public java.lang.String getPPPIPAddressServer(java.lang.String entryName)

Get the PPP IP address of the server connected to via an entry.

Parameters:
entryName - The name of the entry.
Returns:
The server's IP address if one exists or a string equal to
  • CONNECTION_NOT_FOUND if the given entry does not have a current connection
  • IP_NOT_YET_AVAILABLE if the IP address is not yet available
    - The IP address is not available until the connection is complete
  • ERROR_CODE_XXX where XXX is the Windows system error code

getPPPIPAddressServerForNonEntry

public java.lang.String getPPPIPAddressServerForNonEntry(java.lang.String connectionID)

Get the PPP IP address of the server connected to via a non-entry connection.

Parameters:
connectionID - The connection ID for this connection
Returns:
The server's IP address if one exists or a string equal to
  • CONNECTION_NOT_FOUND if the given entry does not have a current connection
  • IP_NOT_YET_AVAILABLE if the IP address is not yet available
    - The IP address is not available until the connection is complete
  • ERROR_CODE_XXX where XXX is the Windows system error code

renameEntry

public boolean renameEntry(java.lang.String oldEntryName,
                           java.lang.String newEntryName)

Rename an entry.

Parameters:
oldEntryName - The current entry name.
newEntryName - The new entry name.
Returns:
true if successful, false otherwise. If library load error, returns false.

deleteEntry

public boolean deleteEntry(java.lang.String entryName)

Delete an entry.

Parameters:
entryName - The name of the entry to be deleted.
Returns:
true if successful, false otherwise. If library load error, returns false.

displayCreateEntryWindowAsynchronous

public void displayCreateEntryWindowAsynchronous()

Displays the create new entry window asynchronously. Asynchronous refers to using a different thread of execution.

This method does not function in Windows Vista.


displayCreateEntryWindowSynchronous

public void displayCreateEntryWindowSynchronous()

Displays the create new entry window synchronously. Synchronous refers to using the same thread of execution.

This method does not function in Windows Vista.


displayEditEntryWindowAsynchronous

public void displayEditEntryWindowAsynchronous(java.lang.String entryName)

Displays the edit entry window asynchronously. Asynchronous refers to using a different thread of execution.

This method does not function in Windows Vista.

Parameters:
entryName - The name of the entry.

displayEditEntryWindowSynchronous

public void displayEditEntryWindowSynchronous(java.lang.String entryName)

Displays the edit entry window synchronously. Synchronous refers to using the same thread of execution.

This method does not function in Windows Vista.

Parameters:
entryName - The name of the entry.

getErrorMessageForCode

public java.lang.String getErrorMessageForCode(int errorCode)

Retrieve a String representation of an error code.

Parameters:
errorCode - The error code to lookup.
Returns:
A String meaning for an error code. If library load error, returns null.
See Also:
DialingNotification.notifyDialingState dialEntrySynchronous

isConnected

public boolean isConnected()

Determines if there are any active dial-up networking entry connections.

Returns:
true if connections, false otherwise. If library load error, returns false.

isNonEntryConnected

public boolean isNonEntryConnected(java.lang.String connectionID)

Determines if the non-entry is connected.

Parameters:
connectionID - The connection ID returned when dialing a non-entry.
Returns:
true if connected, false otherwise. If library load error, returns false.

isEntryConnected

public boolean isEntryConnected(java.lang.String entryName)

Determines if the entry is connected.

Parameters:
entryName - The name of the entry.
Returns:
true if connected, false otherwise. If library load error, returns false.

hasEntry

public boolean hasEntry(java.lang.String entryName)

Determines if the entry exists.

Parameters:
entryName - The entry name.
Returns:
true if the name exists, false otherwise.

getStatisticDuration

public long getStatisticDuration(java.lang.String entryName)

Retrieve the duration of a connection for a given entry.

This method only works in Windows 2000 and XP.

Parameters:
entryName - The name of the entry.
Returns:
the duration of the connection in milliseconds or a negative number if no connection or other failure

getStatisticReceived

public long getStatisticReceived(java.lang.String entryName)

Retrieve the number of bytes received for a connection of a given entry.

This method only works in Windows 2000 and XP.

Parameters:
entryName - The name of the entry.
Returns:
the number of bytes received or a negative number if no connection or other failure

getStatisticTransmitted

public long getStatisticTransmitted(java.lang.String entryName)

Retrieve the number of bytes transmitted for a connection of a given entry.

This method only works in Windows 2000 and XP.

Parameters:
entryName - The name of the entry.
Returns:
the number of bytes transmitted or a negative number if no connection or other failure

getDefaultEntry

public java.lang.String getDefaultEntry()

Get the name of the default entry.

Default entry does not exist on operating systems before XP.

It is possible for the default entry name to not actually exist as an entry so it is recommended to use the hasEntry method to ensure it exists before using it.

Returns:
A String with the name of the default entry or null if one does not exist.

getEntryNames

public java.lang.String[] getEntryNames()

Get all entry names.

Returns:
A String array of all entry names. If library load error, returns null.

getDialUpDeviceModem

public DialUpDevice getDialUpDeviceModem()

Retrieves the first modem dial-up device it can find.

Each entry has a dial-up device that it uses to connect.

Returns:
A DialUpDevice object that is a modem or null if none.

getDialUpDevice

public DialUpDevice getDialUpDevice(java.lang.String type)

Retrieves the first dial-up device of a certain type it can find.

Types include but are not limited to "modem", "vpn", "pppoe", and "parallel".

Parameters:
type - The type of the device to locate.
Returns:
A DialUpDevice object of the specified type or null if none.

getDialUpDevices

public DialUpDevice[] getDialUpDevices()

Retrieves all dial-up devices present on the computer.

Each entry has a dial-up device that it uses to connect.

Returns:
An array of DialUpDevice objects.

getDialUpEntryProperties

public DialUpEntryProperties getDialUpEntryProperties(java.lang.String entryName)

Retrieves the dial-up properties of an entry.

Parameters:
entryName - The name of the entry.
Returns:
DialUpEntryProperties for entryName, null if no such entry

createEntry

public boolean createEntry(java.lang.String entryName)

Creates a new dial-up entry with default properties.

Parameters:
entryName - The name of the entry.
Returns:
true if created, false if failure or if the entry name already exists.

createEntry

public boolean createEntry(java.lang.String entryName,
                           DialUpEntryProperties dialUpEntryProperties)

Creates a new dial-up entry with the specified properties.

Parameters:
entryName - The name of the entry.
dialUpEntryProperties - The properties to assign to the entry.
Returns:
true if created, false if failure or if the entry name already exists.

setDialUpEntryProperties

public boolean setDialUpEntryProperties(java.lang.String entryName,
                                        DialUpEntryProperties dialUpEntryProperties)

Specifies the dial-up entry properties to use for the entry.

Parameters:
entryName - The name of the entry.
dialUpEntryProperties - The properties to assign to the entry.
Returns:
true if success, false otherwise.

dialEntrySynchronous

public int dialEntrySynchronous(java.lang.String entryName)

Dials an entry synchronously. Synchronous refers to using the same thread of execution.

Parameters:
entryName - The name of the entry to dial.
Returns:
0 if success, otherwise an error code.
  • Returns a positive error code if Windows system error.
  • Returns -2 if dial attempt is hung up by another thread.
  • Returns -1 if library load error or an uknown error.
See Also:
getErrorMessageForCode

dialEntrySynchronous

public int dialEntrySynchronous(java.lang.String entryName,
                                java.lang.String phoneNumber)

Dials an entry synchronously. Synchronous refers to using the same thread of execution.

Parameters:
entryName - The name of the entry to dial.
phoneNumber - The phone number to dial.
Returns:
0 if success, otherwise an error code.
  • Returns a positive error code if Windows system error.
  • Returns -2 if dial attempt is hung up by another thread.
  • Returns -1 if library load error or an uknown error.
See Also:
getErrorMessageForCode

dialEntryAsynchronous

public boolean dialEntryAsynchronous(java.lang.String entryName)

Dials an entry asynchronously. Asynchronous refers to using a different thread of execution.

If a connection is lost, be sure to call hangUpEntry for the entry.

Parameters:
entryName - The name of the entry to dial.
Returns:
true if started dialing, false otherwise. If library load error, returns false.
See Also:
DialingNotification

dialEntryAsynchronous

public boolean dialEntryAsynchronous(java.lang.String entryName,
                                     java.lang.String phoneNumber)

Dials an entry asynchronously. Asynchronous refers to using a different thread of execution.

If a connection is lost, be sure to call hangUpEntry for the entry.

Parameters:
entryName - The name of the entry to dial.
phoneNumber - The phone number to dial.
Returns:
true if started dialing, false otherwise. If library load error, returns false.
See Also:
DialingNotification

dialEntrySynchronous

public int dialEntrySynchronous(java.lang.String entryName,
                                java.lang.String username,
                                java.lang.String password)

Dials an entry synchronously. Synchronous refers to using the same thread of execution.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
Returns:
0 if success, otherwise an error code.
  • Returns a positive error code if Windows system error.
  • Returns -2 if dial attempt is hung up by another thread.
  • Returns -1 if library load error or an uknown error.
See Also:
getErrorMessageForCode

dialEntryAsynchronous

public boolean dialEntryAsynchronous(java.lang.String entryName,
                                     java.lang.String username,
                                     java.lang.String password)

Dials an entry asynchronously. Asynchronous refers to using a different thread of execution.

If a connection is lost, be sure to call hangUpEntry for the entry.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
Returns:
true if started dialing, false otherwise. If library load error, returns false.
See Also:
DialingNotification

dialEntrySynchronous

public int dialEntrySynchronous(java.lang.String entryName,
                                java.lang.String username,
                                java.lang.String password,
                                java.lang.String domain)

Dials an entry synchronously. Synchronous refers to using the same thread of execution.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur.
Returns:
0 if success, otherwise an error code.
  • Returns a positive error code if Windows system error.
  • Returns -2 if dial attempt is hung up by another thread.
  • Returns -1 if library load error or an uknown error.
See Also:
getErrorMessageForCode

dialEntrySynchronous

public int dialEntrySynchronous(java.lang.String entryName,
                                java.lang.String username,
                                java.lang.String password,
                                java.lang.String domain,
                                java.lang.String phoneNumber)

Dials an entry synchronously. Synchronous refers to using the same thread of execution.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur. Use "" if no domain.
phoneNumber - The phone number to dial.
Returns:
0 if success, otherwise an error code.
  • Returns a positive error code if Windows system error.
  • Returns -2 if dial attempt is hung up by another thread.
  • Returns -1 if library load error or an uknown error.
See Also:
getErrorMessageForCode

dialEntryAsynchronous

public boolean dialEntryAsynchronous(java.lang.String entryName,
                                     java.lang.String username,
                                     java.lang.String password,
                                     java.lang.String domain)

Dials an entry asynchronously. Asynchronous refers to using a different thread of execution.

If a connection is lost, be sure to call hangUpEntry for the entry.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur.
Returns:
true if started dialing, false otherwise. If library load error, returns false.
See Also:
DialingNotification

dialEntryAsynchronous

public boolean dialEntryAsynchronous(java.lang.String entryName,
                                     java.lang.String username,
                                     java.lang.String password,
                                     java.lang.String domain,
                                     java.lang.String phoneNumber)

Dials an entry asynchronously. Asynchronous refers to using a different thread of execution.

If a connection is lost, be sure to call hangUpEntry for the entry.

Parameters:
entryName - The name of the entry to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur. Use "" if no domain.
phoneNumber - The phone number to dial.
Returns:
true if started dialing, false otherwise. If library load error, returns false.
See Also:
DialingNotification

dialNonEntrySynchronous

public java.lang.String dialNonEntrySynchronous(java.lang.String phoneNumber,
                                                java.lang.String username,
                                                java.lang.String password)

Dials a non-entry (simple connection) synchronously. Synchronous refers to using the same thread of execution.

Parameters:
phoneNumber - The phone number to dial.
username - The username to use for authentication.
password - The password to use for authentication.
Returns:
A connection ID that must be kept for hanging up this non-entry later. If failure, returns null.

dialNonEntrySynchronous

public java.lang.String dialNonEntrySynchronous(java.lang.String phoneNumber,
                                                java.lang.String username,
                                                java.lang.String password,
                                                java.lang.String domain)

Dials a non-entry (simple connection) synchronously. Synchronous refers to using the same thread of execution.

Parameters:
phoneNumber - The phone number to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur.
Returns:
A connection ID that must be kept for hanging up this non-entry later. If failure, returns null.

dialNonEntryAsynchronous

public java.lang.String dialNonEntryAsynchronous(java.lang.String phoneNumber,
                                                 java.lang.String username,
                                                 java.lang.String password)

Dials a non-entry (simple connection) asynchronously. Asynchronous refers to using a different thread of execution.

Parameters:
phoneNumber - The phone number to dial.
username - The username to use for authentication.
password - The password to use for authentication.
Returns:
A connection ID that must be kept for hanging up this non-entry later. If library load error, returns null.

dialNonEntryAsynchronous

public java.lang.String dialNonEntryAsynchronous(java.lang.String phoneNumber,
                                                 java.lang.String username,
                                                 java.lang.String password,
                                                 java.lang.String domain)

Dials a non-entry (simple connection) asynchronously. Asynchronous refers to using a different thread of execution.

Parameters:
phoneNumber - The phone number to dial.
username - The username to use for authentication.
password - The password to use for authentication.
domain - The domain on which authentication is to occur.
Returns:
A connection ID that must be kept for hanging up this non-entry later. If library load error, returns null.

hangUpNonEntry

public boolean hangUpNonEntry(java.lang.String connectionID)

Disconnect the connection for a non-entry.

In order to provide enough time to properly hang up, it is recommended to not exit your application within 3 seconds of executing this method.

Parameters:
connectionID - The connection ID returned when dialing a non-entry.
Returns:
true if successful, false otherwise. If library load error, returns false.

hangUpEntry

public boolean hangUpEntry(java.lang.String entryName)

Disconnect the connection for an entry.

In order to provide enough time to properly hang up, it is recommended to not exit your application within 3 seconds of executing this method.

Parameters:
entryName - The entry name to hang up.
Returns:
true if successful, false otherwise. If library load error, returns false.