|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.m2mi.M2MIProperties
public class M2MIProperties
Class M2MIProperties provides access to properties that are used to configure
the M2MI Layer. In addition to the M2MI properties below, the device
properties must also be specified. See class DeviceProperties
for further
information. The M2MI Layer properties are as follows:
InvocationThread
s the M2MI Layer will use.
To get the value of a given property, the M2MI Layer first searches for the
property name in the Java system properties by calling System.getProperty()
. If not found
there, the M2MI Layer searches for the property name in the M2MI properties
file (see below). If not found there, the M2MI Layer throws an exception to
indicate the property cannot be found. Thus, property values specified with
the -D option on the java command line override property
values in the M2MI properties file.
To find the M2MI properties file, the M2MI Layer searches for the following files, in order, stopping as soon as it finds one:
If the M2MI properties file cannot be found, the M2MI Layer thows an exception.
The M2MI properties file obeys the format specified in class java.util.Properties
.
To run the M2MI Layer, all the properties listed above (other than
edu.rit.m2mi.properties) must be defined, either as system
properties, or in the M2MI properties file. There are no default values.
Also, all the device properties must be defined, either as system properties,
or in the device properties file; see class DeviceProperties
for further
information.
Here is an example of an M2MI properties file. A copy of this file is included in the M2MI Library (m2mi.properties).
# M2MI Properties File # Maximum number of concurrent method calls (integer >= 1) edu.rit.m2mi.maxcalls = 1 # M2MI Layer does invocation messages (integer, 0 = no, non-0 = yes) edu.rit.m2mi.messaging = 1 # InvocationThread debug level (integer) # 0 = Don't print # 1 = Print exception stack traces # 2 = Print exception stack traces and debug messages edu.rit.m2mi.debug.InvocationThread = 0 # ReceiverThread debug level (integer) # 0 = Don't print # 1 = Print exception stack traces # 2 = Print exception stack traces and incoming M2MI messages # 3 = Print exception stack traces and incoming M2MI messages including message prefixes edu.rit.m2mi.debug.ReceiverThread = 0 |
Method Summary | |
---|---|
static int |
getDebugInvocationThread()
Returns the debug level for InvocationThreads, property edu.rit.m2mi.debug.InvocationThread. |
static int |
getDebugReceiverThread()
Returns the debug level for the ReceiverThread, property edu.rit.m2mi.debug.ReceiverThread. |
static int |
getMaxCalls()
Returns the maximum number of concurrent method calls, property edu.rit.m2mi.maxcalls. |
static boolean |
isMessaging()
Returns true if the M2MI Layer should broadcast and receive invocation messages, false otherwise. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int getMaxCalls()
M2MIPropertyFileException
- (unchecked exception) Thrown if the M2MI properties file cannot be
found or cannot be read.
M2MIPropertyMissingException
- (unchecked exception) Thrown if the property value cannot be found.
M2MIPropertyValueException
- (unchecked exception) Thrown if the property value is not a decimal
integer >= 1.public static boolean isMessaging()
M2MIPropertyFileException
- (unchecked exception) Thrown if the M2MI properties file cannot be
found or cannot be read.
M2MIPropertyMissingException
- (unchecked exception) Thrown if the property value cannot be found.
M2MIPropertyValueException
- (unchecked exception) Thrown if the property value is not a
decimal integer.public static int getDebugInvocationThread()
M2MIPropertyFileException
- (unchecked exception) Thrown if the M2MI properties file cannot be
found or cannot be read.
M2MIPropertyMissingException
- (unchecked exception) Thrown if the property value cannot be found.
M2MIPropertyValueException
- (unchecked exception) Thrown if the property value is not a decimal
integer in the range 0 through 2.public static int getDebugReceiverThread()
M2MIPropertyFileException
- (unchecked exception) Thrown if the M2MI properties file cannot be
found or cannot be read.
M2MIPropertyMissingException
- (unchecked exception) Thrown if the property value cannot be found.
M2MIPropertyValueException
- (unchecked exception) Thrown if the property value is not a decimal
integer in the range 0 through 3.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |