com.virtuosotechnologies.lib.platform
Interface PlatformProvider

All Known Implementing Classes:
MacOSXPlatformProvider

public interface PlatformProvider

Platform-specific providers need to implement this interface. This is here as a buffer so that PlatformUtils doesn't need to know anything about the implementation classes for platform providers.


Method Summary
 boolean initialize()
          Initialize this provider.
 Object performOperation(String operation, Object data)
          Perform a platform-specific operation.
 

Method Detail

initialize

public boolean initialize()
Initialize this provider. Returns a boolean value specifying whether the provider is supported by the running platform or not. This is called by the platform mechanism when it starts up, and should not be called by clients.

Returns:
true if the provider is supported, or false if not.

performOperation

public Object performOperation(String operation,
                               Object data)
Perform a platform-specific operation. Throws an IllegalStateException if the initialization failed.

Parameters:
operation - identification of the operation
data - parameters
Returns:
return value
Throws:
IllegalStateException - initialize not yet called or returned false.