FileDocCategorySizeDatePackage
NativeInvocationBridge.javaAPI DocAzureus 3.0.3.43062Thu Feb 09 19:43:22 GMT 2006org.gudy.azureus2.platform.macosx

NativeInvocationBridge

public abstract class NativeInvocationBridge extends Object

Performs PlatformManager and platform-specific tasks using bridges like Cocoa-Java -> ObjC

The methods supplied are intended to reflect those that can be dealt with a way other than OSAScript. Ensure that the method signatures match those of PlatformManagerImpl, but they should generally return a boolean (false for failure).

version
1.0

Fields Summary
private static NativeInvocationBridge
instance
Constructors Summary
protected NativeInvocationBridge()

Methods Summary
protected voiddispose()
Disposes system resources

protected abstract booleanisEnabled()

Gets whether the invocation bridge is available for use

This method is used to anticipate scenarios such as where the bridge will fail due to missing classpaths

protected booleanperformRecoverableFileDelete(java.io.File path)

see
PlatformManager#performRecoverableFileDelete(java.io.File)

return false;
protected static final org.gudy.azureus2.platform.macosx.NativeInvocationBridgesharedInstance()
Gets the singleton

return
The NativeInvocationBridge singleton

        try
        {
            Object newInstance = Class.forName("org.gudy.azureus2.platform.macosx.access.cocoa.CocoaJavaBridge").getConstructor(null).newInstance(null);
            instance = (NativeInvocationBridge)newInstance;
        }
        catch(Exception e)
        {
            Debug.out(e);
            instance = new DummyBridge();
        }
    
        return instance;
    
protected booleanshowInFinder(java.io.File path)

see
PlatformManagerImpl#showInFinder(java.io.File)

return false;