Class PlatformManagerImpl
java.lang.Object
com.biglybt.platform.dummy.PlatformManagerImpl
- All Implemented Interfaces:
PlatformManager, PlatformManager
- Version:
- 1.0
-
Field Summary
FieldsFields inherited from interface PlatformManager
LOC_DOCUMENTS, LOC_DOWNLOADS, LOC_MUSIC, LOC_USER_DATA, LOC_VIDEOFields inherited from interface PlatformManager
ERR_UNSUPPORTED, PT_MACOSX, PT_OTHER, PT_UNIX, PT_WINDOWS, SD_ALL, SD_HIBERNATE, SD_SHUTDOWN, SD_SLEEP, USER_REQUEST_INFO, USER_REQUEST_QUESTION, USER_REQUEST_WARNING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddListener(PlatformManagerListener listener) voidcopyFilePermissions(String from_file_name, String to_file_name) voidcreateProcess(String command_line, boolean inherit_handles) voiddispose()Does nothingString[]getLocation(long location_id) Get a well-known location, if defined for the platformintThis max-open-files concept here is from linux/osx where network connections are treated as 'files'intbooleanbooleanintstatic PlatformManagerbooleanhasCapability(PlatformManagerCapabilities capability) Gets whether the platform manager supports a capabilitybooleanisAdditionalFileTypeRegistered(String name, String type) Checks to see if the supplied file type is registered with this applicationbooleanClass<?> loadClass(ClassLoader loader, String class_name) Gives a particular platform the ability to alter the class-loading methodvoidperformRecoverableFileDelete(String file_name) voidping(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) voidregisterAdditionalFileType(String name, String description, String type, String content_type) Registers a file type with this applicationvoidvoidremoveListener(PlatformManagerListener listener) voidrequestUserAttention(int type, Object data) Requests the user's attention such as bouncing the application icon on OSXvoidsetExplicitVMOptions(String[] options) voidsetPreventComputerSleep(boolean b) voidsetRunAtLogin(boolean run) voidsetTCPTOSEnabled(boolean enabled) enable or disable the platforms support for TCP TOSvoidReveals the file or directory with the platform's default browservoidshutdown(int type) voidbooleantestNativeAvailability(String name) voidtraceRoute(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) voidunregisterAdditionalFileType(String name, String type) Removes a file-type registrationMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface PlatformManager
setUseSystemTheme
-
Field Details
-
singleton
-
-
Constructor Details
-
PlatformManagerImpl
private PlatformManagerImpl()
-
-
Method Details
-
getSingleton
-
getPlatformType
public int getPlatformType()- Specified by:
getPlatformTypein interfacePlatformManager
-
getUserDataDirectory
- Specified by:
getUserDataDirectoryin interfacePlatformManager- Throws:
PlatformManagerException
-
isApplicationRegistered
- Specified by:
isApplicationRegisteredin interfacePlatformManager- Throws:
PlatformManagerException
-
getApplicationCommandLine
- Specified by:
getApplicationCommandLinein interfacePlatformManager- Throws:
PlatformManagerException
-
getComputerName
- Specified by:
getComputerNamein interfacePlatformManager- Returns:
- null if can't be found
-
getLocation
Description copied from interface:PlatformManagerGet a well-known location, if defined for the platform- Specified by:
getLocationin interfacePlatformManager- Parameters:
location_id- from above LOC_constants- Returns:
- Throws:
PlatformManagerException
-
getVMOptionFile
- Specified by:
getVMOptionFilein interfacePlatformManager- Throws:
PlatformManagerException
-
getExplicitVMOptions
- Specified by:
getExplicitVMOptionsin interfacePlatformManager- Throws:
PlatformManagerException
-
getRunAtLogin
- Specified by:
getRunAtLoginin interfacePlatformManager- Throws:
PlatformManagerException
-
setRunAtLogin
- Specified by:
setRunAtLoginin interfacePlatformManager- Throws:
PlatformManagerException
-
startup
- Specified by:
startupin interfacePlatformManager- Throws:
PlatformManagerException
-
getShutdownTypes
public int getShutdownTypes()- Specified by:
getShutdownTypesin interfacePlatformManager
-
shutdown
- Specified by:
shutdownin interfacePlatformManager- Throws:
PlatformManagerException
-
setPreventComputerSleep
- Specified by:
setPreventComputerSleepin interfacePlatformManager- Throws:
PlatformManagerException
-
getPreventComputerSleep
public boolean getPreventComputerSleep()- Specified by:
getPreventComputerSleepin interfacePlatformManager
-
setExplicitVMOptions
- Specified by:
setExplicitVMOptionsin interfacePlatformManager- Throws:
PlatformManagerException
-
isAdditionalFileTypeRegistered
public boolean isAdditionalFileTypeRegistered(String name, String type) throws PlatformManagerException Description copied from interface:PlatformManagerChecks to see if the supplied file type is registered with this application- Specified by:
isAdditionalFileTypeRegisteredin interfacePlatformManager- Parameters:
name-type-- Returns:
- Throws:
PlatformManagerException
-
unregisterAdditionalFileType
Description copied from interface:PlatformManagerRemoves a file-type registration- Specified by:
unregisterAdditionalFileTypein interfacePlatformManager- Parameters:
name-type-- Throws:
PlatformManagerException
-
registerApplication
- Specified by:
registerApplicationin interfacePlatformManager- Throws:
PlatformManagerException
-
registerAdditionalFileType
public void registerAdditionalFileType(String name, String description, String type, String content_type) throws PlatformManagerException Description copied from interface:PlatformManagerRegisters a file type with this application- Specified by:
registerAdditionalFileTypein interfacePlatformManager- Parameters:
name-description-type-content_type-- Throws:
PlatformManagerException
-
createProcess
public void createProcess(String command_line, boolean inherit_handles) throws PlatformManagerException - Specified by:
createProcessin interfacePlatformManager- Throws:
PlatformManagerException
-
performRecoverableFileDelete
- Specified by:
performRecoverableFileDeletein interfacePlatformManager- Throws:
PlatformManagerException
-
getVersion
- Specified by:
getVersionin interfacePlatformManager- Throws:
PlatformManagerException
-
setTCPTOSEnabled
enable or disable the platforms support for TCP TOS- Specified by:
setTCPTOSEnabledin interfacePlatformManager- Parameters:
enabled-- Throws:
PlatformManagerException
-
copyFilePermissions
public void copyFilePermissions(String from_file_name, String to_file_name) throws PlatformManagerException - Specified by:
copyFilePermissionsin interfacePlatformManager- Throws:
PlatformManagerException
-
showFile
Reveals the file or directory with the platform's default browser- Specified by:
showFilein interfacePlatformManager- Parameters:
file_name- The full path to a file or directory- Throws:
PlatformManagerException- If this operation fails
-
testNativeAvailability
- Specified by:
testNativeAvailabilityin interfacePlatformManager- Throws:
PlatformManagerException
-
traceRoute
public void traceRoute(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) throws PlatformManagerException - Specified by:
traceRoutein interfacePlatformManager- Throws:
PlatformManagerException
-
ping
public void ping(InetAddress interface_address, InetAddress target, PlatformManagerPingCallback callback) throws PlatformManagerException - Specified by:
pingin interfacePlatformManager- Throws:
PlatformManagerException
-
getMaxOpenFiles
Description copied from interface:PlatformManagerThis max-open-files concept here is from linux/osx where network connections are treated as 'files'- Specified by:
getMaxOpenFilesin interfacePlatformManager- 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.
- Specified by:
hasCapabilityin interfacePlatformManager- Parameters:
capability- A platform manager capability- Returns:
- True if the manager supports the capability
-
dispose
-
addListener
- Specified by:
addListenerin interfacePlatformManager
-
removeListener
- Specified by:
removeListenerin interfacePlatformManager
-
getAzComputerID
- Throws:
PlatformManagerException
-
requestUserAttention
Description copied from interface:PlatformManagerRequests the user's attention such as bouncing the application icon on OSX- Specified by:
requestUserAttentionin interfacePlatformManager- Parameters:
type-data-- Throws:
PlatformManagerException
-
loadClass
Description copied from interface:PlatformManagerGives a particular platform the ability to alter the class-loading method- Specified by:
loadClassin interfacePlatformManager- Parameters:
loader-class_name-- Returns:
- Throws:
PlatformManagerException
-