|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jpackages.jdun.DialUpEntryProperties
public class DialUpEntryProperties
This class defines the properties for a dial-up entry.
Example 1 (editing properties):
// dialUpManager is an instance of DialUpManager
DialUpEntryProperties props = dialUpManager.getDialUpEntryProperties("My Connection");
// set the area code and phone number and set it to use the area code
props.setAreaCode("504");
props.setUseCountryAndAreaCodes(true);
props.setLocalPhoneNumber("5551234");
// specify a script file for the entry. scriptFile is a String path for the file
props.setScriptFilePath(scriptFile);
// update the entry's properties
dialUpManager.setDialUpEntryProperties("My Connection", props);
Example 2 (creating dial-up entry):
// dialUpManager is an instance of DialUpManager
DialUpDevice modem = dialUpManager.getDialUpDeviceModem();
dialUpManager.createEntry("My Connection", new DialUpEntryProperties("5551234", modem));
Example 3 (creating VPN entry - only works in Windows 2000/XP/Vista):
// dialUpManager is an instance of DialUpManager
DialUpDevice vpn = dialUpManager.getDialUpDevice("vpn");
DialUpEntryProperties props = new DialUpEntryProperties();
props.setDialUpDevice(vpn);
props.setEntryType(DialUpEntryProperties.ENTRY_TYPE_VPN);
dialUpManager.createEntry("My VPN Connection", props);
Copyright (c) 2001-2007
| Field Summary | |
|---|---|
static int |
ENTRY_TYPE_BROADBAND
Indicates a Broadband (PPPoE) entry type. |
static int |
ENTRY_TYPE_DIRECT
Indicates a direct (serial or parallel) entry type. |
static int |
ENTRY_TYPE_PHONE
Indicates a phone line (modem, ISDN) entry type. |
static int |
ENTRY_TYPE_VPN
Indicates a Virtual Private Network (VPN) entry type. |
static int |
FRAMING_PROTOCOL_PPP
Indicates a Point-to-Point Protocol (PPP) |
static int |
FRAMING_PROTOCOL_SLIP
Indicates a Serial Line Internet Protocol (SLIP) |
| Constructor Summary | |
|---|---|
DialUpEntryProperties()
Construct DialUpEntryProperties with all default values and no specified phone number. |
|
DialUpEntryProperties(java.lang.String local_phone_number,
DialUpDevice dialUpDevice)
Construct DialUpEntryProperties with all default values and the specified phone number and DialUpDevice. |
|
| Method Summary | |
|---|---|
java.lang.String |
getAreaCode()
Retrieves the area code to use when dialing. |
int |
getCountryID()
Retrieves the TAPI country identifier. |
DialUpDevice |
getDialUpDevice()
Retrieves the DialUpDevice used. |
boolean |
getDisableLCPExtensions()
Retrieves if PPP LCP extensions are to be disabled. |
boolean |
getDisplayTerminalWindowAfterDial()
Retrieves if a terminal window is to be displayed after dialing. |
boolean |
getDisplayTerminalWindowBeforeDial()
Retrieves if a terminal window is to be displayed before dialing. |
int |
getEntryType()
Retrieves the entry type. |
long |
getFlags2()
|
int |
getFramingProtocol()
Retrieves the framing protocol used. |
java.lang.String |
getIPAddress()
Retrieves the IP address. |
java.lang.String |
getIPAddressForDNS()
Retrieves the IP address for Primary DNS. |
java.lang.String |
getIPAddressForSecondaryDNS()
Retrieves the IP address for Secondary DNS. |
java.lang.String |
getIPAddressForSecondaryWINS()
Retrieves the IP address for Secondary WINS. |
java.lang.String |
getIPAddressForWINS()
Retrieves the IP address for Primary WINS. |
java.lang.String |
getLocalPhoneNumber()
Retrieves the telephone number to use when dialing. |
boolean |
getLogOnToNetwork()
Retrieves if this entry is to log on to the network. |
boolean |
getRequireDataEncryption()
Retrieves if data encryption is required. |
boolean |
getRequireEncryptedPassword()
Retrieves if encrypted passwords are required. |
boolean |
getRequireMicrosoftEncryptedPassword()
Retrieves if Microsoft encrypted passwords are required. |
java.lang.String |
getScriptFilePath()
Retrieves the script file path used. |
boolean |
getUseClientForMicrosoftNetworks()
|
boolean |
getUseCountryAndAreaCodes()
Retrieves if the country and area codes are to be used. |
boolean |
getUseDefaultGatewayOnRemoteNetwork()
Retrieves if default gateway on remote network is to be used. |
boolean |
getUseIPHeaderCompression()
Retrieves if IP header compression is to be used. |
boolean |
getUseProtocolIPX()
Retrieves if the IPX protocol is to be used. |
boolean |
getUseProtocolNetBEUI()
Retrieves if the NetBEUI protocol is to be used. |
boolean |
getUseProtocolTCPIP()
Retrieves if the TCP/IP protocol is to be used. |
boolean |
getUseSoftwareCompression()
Retrieve if software compression is to be used. |
boolean |
getUseSpecificIPAddress()
Retrieves if a specific IP address is to be used. |
boolean |
getUseSpecificNameServers()
Retrieves if specific name servers are to be used. |
void |
setAreaCode(java.lang.String area_code)
Specifies the area code to use when dialing. |
void |
setCountryID(int id)
Specifies the TAPI country identifier. |
void |
setDialUpDevice(DialUpDevice dialUpDevice)
Specifies the DialUpDevice to use. |
void |
setDisableLCPExtensions(boolean b)
Disables the PPP LCP extensions. |
void |
setDisplayTerminalWindowAfterDial(boolean b)
Display a terminal window after dialing. |
void |
setDisplayTerminalWindowBeforeDial(boolean b)
Display a terminal window before dialing. |
void |
setEntryType(int type)
Sets the entry type. |
void |
setFramingProtocol(int framing_protocol)
Specifies the framing protocol to be used. |
void |
setIPAddress(java.lang.String ipAddress)
Specifies the IP address to use. |
void |
setIPAddressForDNS(java.lang.String ipAddress)
Specifies the IP address to use as Primary DNS. |
void |
setIPAddressForSecondaryDNS(java.lang.String ipAddress)
Specifies the IP address to use as Secondary DNS. |
void |
setIPAddressForSecondaryWINS(java.lang.String ipAddress)
Specifies the IP address to use as Secondary WINS. |
void |
setIPAddressForWINS(java.lang.String ipAddress)
Specifies the IP address to use as Primary WINS. |
void |
setLocalPhoneNumber(java.lang.String local_phone_number)
Specifies a telephone number to use when dialing. |
void |
setLogOnToNetwork(boolean b)
Log on to the network |
void |
setRequireDataEncryption(boolean b)
Requires data encryption. |
void |
setRequireEncryptedPassword(boolean b)
Require encrypted password. |
void |
setRequireMicrosoftEncryptedPassword(boolean b)
Require Microsoft encrypted passord. |
void |
setScriptFilePath(java.lang.String script_file_path)
Specifies the script file path to use. |
void |
setUseClientForMicrosoftNetworks(boolean b)
|
void |
setUseCountryAndAreaCodes(boolean b)
Use the area code and country ID when dialing. |
void |
setUseDefaultGatewayOnRemoteNetwork(boolean b)
Use default gateway on remote network. |
void |
setUseIPHeaderCompression(boolean b)
Use IP header comression. |
void |
setUseProtocolIPX(boolean b)
Use the IPX protocol. |
void |
setUseProtocolNetBEUI(boolean b)
Use the NetBEUI protocol. |
void |
setUseProtocolTCPIP(boolean b)
Use the TCP/IP protocol. |
void |
setUseSoftwareCompression(boolean b)
Use software compression. |
void |
setUseSpecificIPAddress(boolean b)
Use a specific IP address. |
void |
setUseSpecificNameServers(boolean b)
Use specific name servers. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FRAMING_PROTOCOL_PPP
public static final int FRAMING_PROTOCOL_SLIP
public static final int ENTRY_TYPE_PHONE
public static final int ENTRY_TYPE_VPN
public static final int ENTRY_TYPE_DIRECT
public static final int ENTRY_TYPE_BROADBAND
| Constructor Detail |
|---|
public DialUpEntryProperties()
Construct DialUpEntryProperties with all default values and no specified phone number.
public DialUpEntryProperties(java.lang.String local_phone_number,
DialUpDevice dialUpDevice)
Construct DialUpEntryProperties with all default values and the specified phone number and DialUpDevice.
local_phone_number - The telephone number.dialUpDevice - The dial-up device.| Method Detail |
|---|
public int getEntryType()
Retrieves the entry type.
Entry types only work in Windows 2000/XP. ENTRY_TYPE_BROADBAND only works in Windows XP.
public void setEntryType(int type)
Sets the entry type.
Entry types include DialUpEntryProperties.ENTRY_TYPE_PHONE, DialUpEntryProperties.ENTRY_TYPE_VPN, DialUpEntryProperties.ENTRY_TYPE_DIRECT, and DialUpEntryProperties.ENTRY_TYPE_BROADBAND.
Entry types only work in Windows 2000/XP. ENTRY_TYPE_BROADBAND only works in Windows XP.
type - The entry type to specify.public long getFlags2()
public void setUseClientForMicrosoftNetworks(boolean b)
public boolean getUseClientForMicrosoftNetworks()
public void setUseCountryAndAreaCodes(boolean b)
Use the area code and country ID when dialing.
b - true to use, false otherwise.public boolean getUseCountryAndAreaCodes()
Retrieves if the country and area codes are to be used.
public void setUseSpecificIPAddress(boolean b)
Use a specific IP address.
b - true to use, false otherwise.public boolean getUseSpecificIPAddress()
Retrieves if a specific IP address is to be used.
public void setUseSpecificNameServers(boolean b)
Use specific name servers.
b - true to use, false otherwise.public boolean getUseSpecificNameServers()
Retrieves if specific name servers are to be used.
public void setUseIPHeaderCompression(boolean b)
Use IP header comression.
b - true to use, false otherwise.public boolean getUseIPHeaderCompression()
Retrieves if IP header compression is to be used.
public void setUseDefaultGatewayOnRemoteNetwork(boolean b)
Use default gateway on remote network.
b - true to use, false otherwise.public boolean getUseDefaultGatewayOnRemoteNetwork()
Retrieves if default gateway on remote network is to be used.
public void setDisableLCPExtensions(boolean b)
Disables the PPP LCP extensions.
b - true to disable, false otherwise.public boolean getDisableLCPExtensions()
Retrieves if PPP LCP extensions are to be disabled.
public void setDisplayTerminalWindowBeforeDial(boolean b)
Display a terminal window before dialing.
NOTE: terminal windows are not displayed when dialing with JDUN.
This has no effect in Windows XP.
b - true to display, false otherwise.public boolean getDisplayTerminalWindowBeforeDial()
Retrieves if a terminal window is to be displayed before dialing.
public void setDisplayTerminalWindowAfterDial(boolean b)
Display a terminal window after dialing.
NOTE: terminal windows are not displayed when dialing with JDUN.
b - true to display, false otherwise.public boolean getDisplayTerminalWindowAfterDial()
Retrieves if a terminal window is to be displayed after dialing.
public void setUseSoftwareCompression(boolean b)
Use software compression.
b - true to use, false otherwise.public boolean getUseSoftwareCompression()
Retrieve if software compression is to be used.
public void setRequireEncryptedPassword(boolean b)
Require encrypted password.
b - true to use, false otherwise.public boolean getRequireEncryptedPassword()
Retrieves if encrypted passwords are required.
public void setRequireMicrosoftEncryptedPassword(boolean b)
Require Microsoft encrypted passord.
b - true to use, false otherwise.public boolean getRequireMicrosoftEncryptedPassword()
Retrieves if Microsoft encrypted passwords are required.
public void setRequireDataEncryption(boolean b)
Requires data encryption.
b - true to use, false otherwise.public boolean getRequireDataEncryption()
Retrieves if data encryption is required.
This is ignored unless setRequireMicrosoftEncryptedPassword is set to true.
public void setLogOnToNetwork(boolean b)
Log on to the network
This has no effect in Windows NT/2000/XP.
b - true to use, false otherwise.public boolean getLogOnToNetwork()
Retrieves if this entry is to log on to the network.
public void setCountryID(int id)
Specifies the TAPI country identifier.
Default is 1 (United States)
id - The country ID.public int getCountryID()
Retrieves the TAPI country identifier.
public void setAreaCode(java.lang.String area_code)
Specifies the area code to use when dialing.
Do not include parantheses or other delimiters in the area code String. For example, "206" is valid but "(206)" is not.
area_code - The area code.public java.lang.String getAreaCode()
Retrieves the area code to use when dialing.
public void setLocalPhoneNumber(java.lang.String local_phone_number)
Specifies a telephone number to use when dialing.
local_phone_number - The telephone number.public java.lang.String getLocalPhoneNumber()
Retrieves the telephone number to use when dialing.
public void setIPAddress(java.lang.String ipAddress)
Specifies the IP address to use.
Format of the String should be "aaa.bbb.ccc.ddd". Invalid formatting may result in errors.
ipAddress - The IP address.public java.lang.String getIPAddress()
Retrieves the IP address.
public void setIPAddressForDNS(java.lang.String ipAddress)
Specifies the IP address to use as Primary DNS.
Format of the String should be "aaa.bbb.ccc.ddd". Invalid formatting may result in errors.
ipAddress - The IP address.public java.lang.String getIPAddressForDNS()
Retrieves the IP address for Primary DNS.
public void setIPAddressForSecondaryDNS(java.lang.String ipAddress)
Specifies the IP address to use as Secondary DNS.
Format of the String should be "aaa.bbb.ccc.ddd". Invalid formatting may result in errors.
ipAddress - The IP address.public java.lang.String getIPAddressForSecondaryDNS()
Retrieves the IP address for Secondary DNS.
public void setIPAddressForWINS(java.lang.String ipAddress)
Specifies the IP address to use as Primary WINS.
Format of the String should be "aaa.bbb.ccc.ddd". Invalid formatting may result in errors.
ipAddress - The IP address.public java.lang.String getIPAddressForWINS()
Retrieves the IP address for Primary WINS.
public void setIPAddressForSecondaryWINS(java.lang.String ipAddress)
Specifies the IP address to use as Secondary WINS.
Format of the String should be "aaa.bbb.ccc.ddd". Invalid formatting may result in errors.
ipAddress - The IP address.public java.lang.String getIPAddressForSecondaryWINS()
Retrieves the IP address for Secondary WINS.
public void setUseProtocolNetBEUI(boolean b)
Use the NetBEUI protocol.
This is ignored in Windows XP.
b - true to use, false otherwise.public boolean getUseProtocolNetBEUI()
Retrieves if the NetBEUI protocol is to be used.
public void setUseProtocolIPX(boolean b)
Use the IPX protocol.
b - true to use, false otherwise.public boolean getUseProtocolIPX()
Retrieves if the IPX protocol is to be used.
public void setUseProtocolTCPIP(boolean b)
Use the TCP/IP protocol.
b - true to use, false otherwise.public boolean getUseProtocolTCPIP()
Retrieves if the TCP/IP protocol is to be used.
public void setFramingProtocol(int framing_protocol)
Specifies the framing protocol to be used.
Valid framing protocols are FRAMING_PROTOCOL_PPP and FRAMING_PROTOCOL_SLIP. FRAMING_PROTOCOL_PPP is the default.
framing_protocol - The framing protocol.public int getFramingProtocol()
Retrieves the framing protocol used.
public void setScriptFilePath(java.lang.String script_file_path)
Specifies the script file path to use.
Use null or "" to specify no script.
NOTE for Windows NT4: Requires latest service pack update for this method to work.
script_file_path - The script file path to use.public java.lang.String getScriptFilePath()
Retrieves the script file path used.
public void setDialUpDevice(DialUpDevice dialUpDevice)
Specifies the DialUpDevice to use.
dialUpDevice - The dial-up device.public DialUpDevice getDialUpDevice()
Retrieves the DialUpDevice used.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||