stella.net
Class TelescopeClient.Blocking

java.lang.Object
  extended by stella.net.TelescopeClient.Blocking
All Implemented Interfaces:
ReplySubscriber
Enclosing class:
TelescopeClient

private static class TelescopeClient.Blocking
extends Object
implements ReplySubscriber

A class that allows blocking on incoming commands.


Field Summary
private static List active
          A list of offset commands sent during guiding where we don't wait.
private static long MAXTIMEOUT
          Maximum time-out, independant from command.
private static TelescopeClient to
          The telescope client to block.
private static Object wait
          A locking object.
 
Constructor Summary
TelescopeClient.Blocking(TelescopeClient receiver)
          Constructs a new adapter-to-telescope caster.
 
Method Summary
 boolean castCommandAndWait(CommandEvent ce)
          Casts the command and blocks.
 void forward(ReplyEvent re)
          If the received reply matches an offset sent during guiding, we remove it from the list and return without notifying.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

wait

private static Object wait
A locking object.


active

private static List active
A list of offset commands sent during guiding where we don't wait.


to

private static TelescopeClient to
The telescope client to block.


MAXTIMEOUT

private static final long MAXTIMEOUT
Maximum time-out, independant from command.

See Also:
Constant Field Values
Constructor Detail

TelescopeClient.Blocking

public TelescopeClient.Blocking(TelescopeClient receiver)
Constructs a new adapter-to-telescope caster. A reply-subscriber that is used for blocking command transfer is registered to the caster client in the TelescopeClient.init() method.

Method Detail

forward

public void forward(ReplyEvent re)
If the received reply matches an offset sent during guiding, we remove it from the list and return without notifying. During acquire, however, the command execution is blocked, thus we then have to notify.

Specified by:
forward in interface ReplySubscriber

castCommandAndWait

public boolean castCommandAndWait(CommandEvent ce)
Casts the command and blocks.