LocalMonitor Class Reference

Local Monitor. More...

#include <LocalMonitor.h>

List of all members.

Public Member Functions

 LocalMonitor (JNIEnv *env, jobject obj, jfieldID lockField=0)
 Constructs new LocalMonitor object.
virtual ~LocalMonitor ()
 Destructs LocalMonitor object.
bool enter ()
 Enters the monitor.
bool exit ()
 Exits the monitor.
bool isEntered () const
 Returns true if the monitor is enered.

Protected Attributes

JNIEnv * m_env
jobject m_obj
bool m_entered


Detailed Description

Local Monitor.

Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)
Version:
0.2.0

Constructor & Destructor Documentation

LocalMonitor::LocalMonitor ( JNIEnv *  env,
jobject  obj,
jfieldID  lockField = 0 
)

Constructs new LocalMonitor object.

Parameters:
env the JNIEnv pointer
obj the Java object
lockField the lock field of the object


Member Function Documentation

bool LocalMonitor::enter (  ) 

Enters the monitor.

Returns:
true if succeed

bool LocalMonitor::exit (  ) 

Exits the monitor.

Returns:
true if succeed

bool LocalMonitor::isEntered (  )  const [inline]

Returns true if the monitor is enered.

Returns:
true if the monitor is enered


Copyright © 2007 ETF and contributors. All Rights Reserved.