Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IJava ¶
type IJava interface { CreateJVM() (IJava, error) // Will create and start the JVM for any JNI threads to communicate with ShutdownJvm() error // Will cleanup any threads remaining and close the JVM Attach() *jnigi.Env // Will attach the current running thread to the JVM Detach() // Will detach the current thread from the JNI environment IsStarted() bool // A simple flag indicating whether or not the JVM has started running }
IJava is the interface that wraps around the JVM. It allows for creation and cleanup. Only one JVM needs to be started. It can then be shared out between goroutines to do with as needed
type Java ¶
Java is the structure that will contain JVM pertinent information.
func (*Java) Attach ¶
Attach is the method to attach the current thread to the JNI environment. This is required in order to execute any JNI commands in the actively running threads and should be used whenever a new go routine is used
func (*Java) Detach ¶
func (java *Java) Detach()
Detach is the method that will unlock the active thread and remove it from the JNI environment This should be done after the attached thread completes
func (*Java) ShutdownJvm ¶
ShutdownJvm will shut down the JVM, this should be done at the end
type MockIJava ¶
MockIJava is an autogenerated mock type for the IJava type
func NewMockIJava ¶
func NewMockIJava(t mockConstructorTestingTNewMockIJava) *MockIJava
NewMockIJava creates a new instance of MockIJava. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockIJava) Detach ¶
func (_m *MockIJava) Detach()
Detach provides a mock function with given fields:
func (*MockIJava) ShutdownJvm ¶
ShutdownJvm provides a mock function with given fields: