Package com.biglybt.platform
Interface PlatformManager
- All Superinterfaces:
PlatformManager
- All Known Implementing Classes:
PlatformManagerImpl
,PlatformManagerImpl
,PlatformManagerImpl
,PlatformManagerImpl
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final int
static final int
static final int
static final int
static final int[]
static final int
static final int
static final int
static final int
static final int
static final int
Fields inherited from interface com.biglybt.pif.platform.PlatformManager
LOC_DOCUMENTS, LOC_DOWNLOADS, LOC_MUSIC, LOC_USER_DATA, LOC_VIDEO
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addListener
(PlatformManagerListener listener) void
copyFilePermissions
(String from_file_name, String to_file_name) void
createProcess
(String command_line, boolean inherit_handles) void
dispose()
Disposes system resources.String[]
int
This max-open-files concept here is from linux/osx where network connections are treated as 'files'int
boolean
boolean
int
boolean
hasCapability
(PlatformManagerCapabilities capability) Gets whether the platform manager supports a capabilityboolean
Class<?>
loadClass
(ClassLoader loader, String class_name) Gives a particular platform the ability to alter the class-loading methodvoid
performRecoverableFileDelete
(String file_name) void
ping
(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) void
void
removeListener
(PlatformManagerListener listener) void
requestUserAttention
(int type, Object data) Requests the user's attention such as bouncing the application icon on OSXvoid
setExplicitVMOptions
(String[] options) void
setPreventComputerSleep
(boolean prevent_it) void
setRunAtLogin
(boolean run) void
setTCPTOSEnabled
(boolean enabled) enable or disable the platforms support for TCP TOSdefault boolean
setUseSystemTheme
(boolean use_it) void
shutdown
(int type) void
boolean
testNativeAvailability
(String name) void
traceRoute
(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) Methods inherited from interface com.biglybt.pif.platform.PlatformManager
getComputerName, getLocation, isAdditionalFileTypeRegistered, registerAdditionalFileType, showFile, unregisterAdditionalFileType
-
Field Details
-
PT_WINDOWS
static final int PT_WINDOWS- See Also:
-
PT_OTHER
static final int PT_OTHER- See Also:
-
PT_MACOSX
static final int PT_MACOSX- See Also:
-
PT_UNIX
static final int PT_UNIX- See Also:
-
USER_REQUEST_INFO
static final int USER_REQUEST_INFO- See Also:
-
USER_REQUEST_WARNING
static final int USER_REQUEST_WARNING- See Also:
-
USER_REQUEST_QUESTION
static final int USER_REQUEST_QUESTION- See Also:
-
SD_SHUTDOWN
static final int SD_SHUTDOWN- See Also:
-
SD_HIBERNATE
static final int SD_HIBERNATE- See Also:
-
SD_SLEEP
static final int SD_SLEEP- See Also:
-
SD_ALL
static final int[] SD_ALL -
ERR_UNSUPPORTED
- See Also:
-
-
Method Details
-
getPlatformType
int getPlatformType() -
getVersion
- Throws:
PlatformManagerException
-
startup
- Throws:
PlatformManagerException
-
getUserDataDirectory
- Throws:
PlatformManagerException
-
isApplicationRegistered
- Throws:
PlatformManagerException
-
registerApplication
- Throws:
PlatformManagerException
-
getApplicationCommandLine
- Throws:
PlatformManagerException
-
getVMOptionFile
- Throws:
PlatformManagerException
-
getExplicitVMOptions
- Throws:
PlatformManagerException
-
setExplicitVMOptions
- Throws:
PlatformManagerException
-
getRunAtLogin
- Throws:
PlatformManagerException
-
setRunAtLogin
- Throws:
PlatformManagerException
-
getShutdownTypes
int getShutdownTypes() -
shutdown
- Throws:
PlatformManagerException
-
setPreventComputerSleep
- Throws:
PlatformManagerException
-
getPreventComputerSleep
boolean getPreventComputerSleep() -
createProcess
- Throws:
PlatformManagerException
-
performRecoverableFileDelete
- Throws:
PlatformManagerException
-
setTCPTOSEnabled
enable or disable the platforms support for TCP TOS- Parameters:
enabled
-- Throws:
PlatformManagerException
-
copyFilePermissions
void copyFilePermissions(String from_file_name, String to_file_name) throws PlatformManagerException - Throws:
PlatformManagerException
-
testNativeAvailability
- Throws:
PlatformManagerException
-
traceRoute
void traceRoute(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) throws PlatformManagerException - Throws:
PlatformManagerException
-
ping
void ping(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) throws PlatformManagerException - Throws:
PlatformManagerException
-
getMaxOpenFiles
This max-open-files concept here is from linux/osx where network connections are treated as 'files'- Returns:
- Throws:
PlatformManagerException
-
setUseSystemTheme
- Parameters:
use_it
-- Returns:
- if changes were made then true is returned, otherwise false
- Throws:
PlatformManagerException
-
loadClass
Gives a particular platform the ability to alter the class-loading method- Parameters:
loader
-class_name
-- Returns:
- Throws:
PlatformManagerException
-
hasCapability
Gets whether the platform manager supports a capability
Users of PlatformManager should check for supported capabilities before calling the corresponding methods
Note that support for a particular capability may change arbitrarily in the duration of the application session, but the manager will cache where necessary.
- Parameters:
capability
- A platform manager capability- Returns:
- True if the manager supports the capability
-
dispose
void dispose()Disposes system resources. This method is optional. -
addListener
-
removeListener
-
requestUserAttention
Requests the user's attention such as bouncing the application icon on OSX- Parameters:
type
-data
-- Throws:
PlatformManagerException
-