edu.stanford.ejalbert.launching.macos
Class MacOs2_0BrowserLaunching

java.lang.Object
  extended by edu.stanford.ejalbert.launching.macos.MacOsBrowserLaunching
      extended by edu.stanford.ejalbert.launching.macos.MacOs2_0BrowserLaunching
All Implemented Interfaces:
IBrowserLaunching

public class MacOs2_0BrowserLaunching
extends MacOsBrowserLaunching

Author:
Markus Gebhard

Field Summary
private  java.lang.Class aeDescClass
           
private  java.lang.reflect.Constructor aeDescConstructor
           
private  java.lang.reflect.Constructor aeTargetConstructor
           
private  java.lang.reflect.Constructor appleEventConstructor
           
private static java.lang.String GURL_EVENT
          The name for the AppleEvent type corresponding to a GetURL event.
private  java.lang.Integer kAnyTransactionID
           
private  java.lang.Integer kAutoGenerateReturnID
           
private  java.lang.Integer keyDirectObject
           
private  java.lang.reflect.Method makeOSType
           
private  java.lang.reflect.Method putParameter
           
private  java.lang.reflect.Method sendNoReply
           
 
Fields inherited from class edu.stanford.ejalbert.launching.macos.MacOsBrowserLaunching
FINDER_CREATOR
 
Fields inherited from interface edu.stanford.ejalbert.launching.IBrowserLaunching
BROWSER_DEFAULT, PROTOCOL_FILE, PROTOCOL_HTTP, PROTOCOL_MAILTO
 
Constructor Summary
MacOs2_0BrowserLaunching()
           
 
Method Summary
private  java.lang.Object getBrowser()
           
 java.util.List getBrowserList()
          Returns a list of browsers to be used for browser targetting.
 void initialize()
          Performs any initialization needed for the particular O/S.
 void openUrl(java.lang.String urlString)
          Opens the passed url in the system's default browser.
 void openUrl(java.lang.String browser, java.lang.String urlString)
          Allows user to target a specific browser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GURL_EVENT

private static final java.lang.String GURL_EVENT
The name for the AppleEvent type corresponding to a GetURL event.

See Also:
Constant Field Values

aeDescClass

private java.lang.Class aeDescClass

aeTargetConstructor

private java.lang.reflect.Constructor aeTargetConstructor

appleEventConstructor

private java.lang.reflect.Constructor appleEventConstructor

aeDescConstructor

private java.lang.reflect.Constructor aeDescConstructor

makeOSType

private java.lang.reflect.Method makeOSType

putParameter

private java.lang.reflect.Method putParameter

sendNoReply

private java.lang.reflect.Method sendNoReply

keyDirectObject

private java.lang.Integer keyDirectObject

kAutoGenerateReturnID

private java.lang.Integer kAutoGenerateReturnID

kAnyTransactionID

private java.lang.Integer kAnyTransactionID
Constructor Detail

MacOs2_0BrowserLaunching

public MacOs2_0BrowserLaunching()
Method Detail

initialize

public void initialize()
                throws BrowserLaunchingInitializingException
Description copied from interface: IBrowserLaunching
Performs any initialization needed for the particular O/S.

Throws:
BrowserLaunchingInitializingException

getBrowser

private java.lang.Object getBrowser()
                             throws BrowserLaunchingInitializingException
Throws:
BrowserLaunchingInitializingException

openUrl

public void openUrl(java.lang.String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
Description copied from interface: IBrowserLaunching
Opens the passed url in the system's default browser.

Parameters:
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

openUrl

public void openUrl(java.lang.String browser,
                    java.lang.String urlString)
             throws UnsupportedOperatingSystemException,
                    BrowserLaunchingExecutionException,
                    BrowserLaunchingInitializingException
Description copied from interface: IBrowserLaunching
Allows user to target a specific browser. The names of potential browsers can be accessed via the getBrowserList method.

If the call to the requested browser fails, the code will fail over to the default browser.

Parameters:
browser - String
urlString - String
Throws:
UnsupportedOperatingSystemException
BrowserLaunchingExecutionException
BrowserLaunchingInitializingException

getBrowserList

public java.util.List getBrowserList()
Returns a list of browsers to be used for browser targetting. This list will always contain at least one item--the BROWSER_DEFAULT.

Returns:
List