|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.gudy.azureus2.platform.macosx.NativeInvocationBridge org.gudy.azureus2.platform.macosx.access.cocoa.CocoaJavaBridge
public final class CocoaJavaBridge
NOTE: This is only used for OSX 10.4 and non-up-to-date 10.5,10.6. OSX 10.5 Update 6 and OSX 10.6 Update 1 provides revealInFinder and moveToTrash functionality.
Performs PlatformManager tasks using Cocoa-Java (FoundationKit only)
For now, operations are performed using NSAppleScript, rather than using NSWorkspace. This is still significantly faster than calling the cmd-line osascript.
Field Summary | |
---|---|
protected static java.lang.String |
CLASS_PATH
The path the Cocoa-Java class files are located at |
protected AEMonitor |
classMon
|
protected boolean |
isDisposed
|
protected org.gudy.azureus2.platform.macosx.access.cocoa.CocoaJavaBridge.RunnableDispatcher |
scriptDispatcher
|
Constructor Summary | |
---|---|
CocoaJavaBridge()
|
Method Summary | |
---|---|
protected void |
dispose()
Disposes system resources |
protected java.lang.Object |
executeScript(java.lang.String scriptFormat,
java.lang.Object[] params)
Executes a new instance of NSAppleScript |
protected java.lang.Object |
executeScriptWithAsync(java.lang.String scriptFormat,
java.lang.Object[] params)
Asynchronously executes a new instance of NSAppleScript |
protected java.lang.Object |
executeScriptWithNewThread(java.lang.String scriptFormat,
java.lang.Object[] params)
Executes a new instance of NSAppleScript in a forked AEThread |
protected void |
finalize()
|
protected boolean |
isEnabled()
Gets whether the invocation bridge is available for use |
protected boolean |
performRecoverableFileDelete(java.io.File path)
|
protected boolean |
showInFinder(java.io.File path,
java.lang.String fileBrowserApp)
|
Methods inherited from class org.gudy.azureus2.platform.macosx.NativeInvocationBridge |
---|
hasSharedInstance, sharedInstance |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String CLASS_PATH
protected AEMonitor classMon
protected boolean isDisposed
protected org.gudy.azureus2.platform.macosx.access.cocoa.CocoaJavaBridge.RunnableDispatcher scriptDispatcher
Constructor Detail |
---|
public CocoaJavaBridge() throws java.lang.Throwable
java.lang.Throwable
Method Detail |
---|
protected boolean performRecoverableFileDelete(java.io.File path)
performRecoverableFileDelete
in class NativeInvocationBridge
PlatformManager#performRecoverableFileDelete(java.io.File)
protected boolean showInFinder(java.io.File path, java.lang.String fileBrowserApp)
showInFinder
in class NativeInvocationBridge
PlatformManagerImpl.showInFinder(java.io.File)
protected boolean isEnabled()
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
isEnabled
in class NativeInvocationBridge
protected final java.lang.Object executeScript(java.lang.String scriptFormat, java.lang.Object[] params) throws java.lang.Throwable
Executes a new instance of NSAppleScript
The method is wrapped in an autorelease pool and an AEMonitor. If there are no format parameters, MessageFormat is not used to parse the format string, and the format string will be treated as the source itself.
java.lang.Throwable
MessageFormat.format(String, Object...)
,
NSAppleScript#execute(com.apple.cocoa.foundation.NSMutableDictionary)
protected final java.lang.Object executeScriptWithNewThread(java.lang.String scriptFormat, java.lang.Object[] params) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Executes a new instance of NSAppleScript in a forked AEThread
This method always returns a "true" event descriptor. Callbacks are currently unsupported , so in the event of an error, the logger is autuomatically notified.
The thread's runSupport method is wrapped in an autorelease pool. If there are no format parameters, MessageFormat is not used to parse the format string, and the format string will be treated as the source itself.
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
AEThread.runSupport()
,
MessageFormat.format(String, Object...)
,
NSAppleScript#execute(com.apple.cocoa.foundation.NSMutableDictionary)
protected final java.lang.Object executeScriptWithAsync(java.lang.String scriptFormat, java.lang.Object[] params) throws java.lang.IllegalArgumentException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Asynchronously executes a new instance of NSAppleScript
This method always returns a "true" event descriptor. Callbacks are currently unsupported , so in the event of an error, the logger is autuomatically notified.
The thread's runSupport method is wrapped in an autorelease pool. If there are no format parameters, MessageFormat is not used to parse the format string, and the format string will be treated as the source itself.
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
java.lang.IllegalArgumentException
AEThread.runSupport()
,
MessageFormat.format(String, Object...)
,
NSAppleScript#execute(com.apple.cocoa.foundation.NSMutableDictionary)
protected void dispose()
dispose
in class NativeInvocationBridge
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |