chrriis.dj.nativeswing.swtimpl
Class NativeInterfaceConfiguration

java.lang.Object
  extended by chrriis.dj.nativeswing.swtimpl.NativeInterfaceConfiguration

public class NativeInterfaceConfiguration
extends Object

Configuration of the native interface. It is not constructed directly but obtained from the native interface.

Author:
Christopher Deckers

Method Summary
 void addNativeClassPathReferenceClasses(Class<?>... nativeClassPathReferenceClasses)
          Set the reference classes that are considered to compute the classpath of the native side.
 void addNativeClassPathReferenceResources(String... nativeClassPathReferenceResources)
          Set the reference resources that are considered to compute the classpath of the native side.
 PeerVMProcessFactory getPeerVMProcessFactory()
          Get the peer VM process factory.
 boolean isNativeSideRespawnedOnError()
          Indicate if the native side respawns on error.
 void setNativeSideRespawnedOnError(boolean isNativeSideRespawnedOnError)
          Set whether the native side respawns on error.
 void setPeerVMParams(String... peerVMParams)
          Set the parameters to add when creating the virtual machine for the native side.
 void setPeerVMProcessFactory(PeerVMProcessFactory peerVMProcessFactory)
          Set the peer VM process factory which allows to override the default peer VM creation mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setPeerVMProcessFactory

public void setPeerVMProcessFactory(PeerVMProcessFactory peerVMProcessFactory)
Set the peer VM process factory which allows to override the default peer VM creation mechanism. This method can be used when the library is compiled to native and a different binary with alternate parameters needs to be called.

Parameters:
peerVMProcessFactory - The factory to set.

getPeerVMProcessFactory

public PeerVMProcessFactory getPeerVMProcessFactory()
Get the peer VM process factory.

Returns:
the peer VM process factory or null if it is not set (in which case the default mechanism is used).

setNativeSideRespawnedOnError

public void setNativeSideRespawnedOnError(boolean isNativeSideRespawnedOnError)
Set whether the native side respawns on error. The default is true.

Parameters:
isNativeSideRespawnedOnError - true if the native side should respawn in case of error, false otherwise.

isNativeSideRespawnedOnError

public boolean isNativeSideRespawnedOnError()
Indicate if the native side respawns on error.

Returns:
true if the native side respawns on error.

addNativeClassPathReferenceClasses

public void addNativeClassPathReferenceClasses(Class<?>... nativeClassPathReferenceClasses)
Set the reference classes that are considered to compute the classpath of the native side.

Parameters:
nativeClassPathReferenceClasses - the classes to use as references when computing the classpath of the native side.

addNativeClassPathReferenceResources

public void addNativeClassPathReferenceResources(String... nativeClassPathReferenceResources)
Set the reference resources that are considered to compute the classpath of the native side.

Parameters:
nativeClassPathReferenceResources - the resources to use as references when computing the classpath of the native side.

setPeerVMParams

public void setPeerVMParams(String... peerVMParams)
Set the parameters to add when creating the virtual machine for the native side.

Parameters:
peerVMParams - the parameters to add when creating the virtual machine for the native side.