|
Communicating Threads for JavaA CSP library for Java© Copyrights 2000 Gerald H. Hilderink |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--csp.lang.Guard
Guard objects are part of the Alternative composition construct. Each Guard object guards a process by a channel. The process may be selected by the Alternative construct when the channel is ready. A Guard that is guarding a process by channel input is called an input-guard and a Guard that is guarding a process by channel output is called an output-guard. A Guard that is always ready is called a skip-guard (CSP features). Also timeout-guards are included (Times CSP features). The input-guard and output-guard objects also support multiway channel guards.
Copyright © 1996-2000 Gerald H. Hilderink. All Rights Reserved.
Constructor Summary | |
Guard()
Create a skip-guard that is always true and performs a skip. |
|
Guard(Boolean enabled)
Create a conditonal skip-guard that and performs a skip if enabled. |
|
Guard(Boolean enabled,
ChannelInput channel)
Create an input-guard with specified channel. |
|
Guard(Boolean enabled,
ChannelInput channel,
Process process)
Create an input-guard with specified channel and process. |
|
Guard(Boolean enabled,
ChannelOutput channel)
Create an output-guard with specified channel. |
|
Guard(Boolean enabled,
ChannelOutput channel,
Process process)
Create an output-guard with specified channel and process. |
|
Guard(Boolean enabled,
long time)
Create a timeout-skip-guard with specified timeout. |
|
Guard(Boolean enabled,
long time,
Process process)
Create a conditional timeout-guard with specified process and timeout. |
|
Guard(Boolean enabled,
Process process)
Create a skip-guard with specified process. |
|
Guard(ChannelInput channel)
Create an input-guard with specified channel. |
|
Guard(ChannelInput channel,
Process process)
Create an input-guard with specified channel and process. |
|
Guard(ChannelOutput channel)
Create an output-guard with specified channel. |
|
Guard(ChannelOutput channel,
Process process)
Create an output-guard with specified channel and process. |
|
Guard(long time)
Create a timeout-skip-guard with specified timeout. |
|
Guard(long time,
Process process)
Create a timeout-guard with specified process and timeout. |
|
Guard(Process process)
Create a skip-guard with specified process. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public Guard()
public Guard(Boolean enabled)
public Guard(ChannelInput channel, Process process)
channel
- the input channelprocess
- the guarded processpublic Guard(ChannelInput channel)
channel
- the input channelpublic Guard(Boolean enabled, ChannelInput channel)
enabled
- true
for enabled; false
for disabledchannel
- the input channelpublic Guard(ChannelOutput channel, Process process)
channel
- the output channelprocess
- the guarded processpublic Guard(ChannelOutput channel)
channel
- the output channelpublic Guard(Boolean enabled, ChannelOutput channel)
enabled
- true
for enabled; false
for disabledchannel
- the output channelpublic Guard(Boolean enabled, ChannelInput channel, Process process)
enabled
.
enabled
- true
for enabled; false
for disabledchannel
- the input channelprocess
- the guarded processpublic Guard(Boolean enabled, ChannelOutput channel, Process process)
enabled
.
enabled
- true
for enabled; false
for disabledchannel
- the output channelprocess
- the guarded processpublic Guard(Process process)
process
- the guarded processpublic Guard(Boolean enabled, Process process)
enabled
.
enabled
- true
for enabled; false
for disabledprocess
- the guarded processpublic Guard(long time)
When multiple timeout guards in the guard list of the Alternative construct then the guard with the smallest timeout will be active. When there are multiple timeout guards with the smallest and equal timeout then one will be selected. One timeout-guard per Alternative is recommended.
time
- the timeout time in millisecondspublic Guard(Boolean enabled, long time)
When multiple timeout guards in the guard list of the Alternative construct then the guard with the smallest timeout will be active. When there are multiple timeout guards with the smallest and equal timeout then one will be selected. One timeout-guard per Alternative is recommended.
enabled
- true
for enabled; false
for disabledtime
- the timeout time in millisecondspublic Guard(long time, Process process)
When multiple timeout guards in the guard list of the Alternative construct then the guard with the smallest timeout will be active. When there are multiple timeout guards with the smallest and equal timeout then one will be selected. One timeout-guard per Alternative is recommended.
time
- the timeout time in msecondsprocess
- the guarded processpublic Guard(Boolean enabled, long time, Process process)
When multiple timeout guards in the guard list of the Alternative construct then the guard with the smallest timeout will be active. When there are multiple timeout guards with the smallest and equal timeout then one will be selected. One timeout-guard per Alternative is recommended.
enabled
- true
for enabled; false
for disabledtime
- the timeout time in msecondsprocess
- the guarded process
|
Communicating Threads for JavaA CSP library for Java© Copyrights 2000 Gerald H. Hilderink |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |