Package behaviors

Class Connecting

java.lang.Object
behaviors.Connecting
All Implemented Interfaces:
lejos.robotics.subsumption.Behavior

public class Connecting extends Object implements lejos.robotics.subsumption.Behavior
Connects to the Java server through the SingleClient.
Since:
2023
  • Constructor Summary

    Constructors
    Constructor
    Description
    Tries to initialize the client.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Whilst the client is not connected tries to connect.This can also throw an exception further up the call stack if the server does not exist.
    void
    Suppress function does nothing here.
    boolean
    Takes control when the state is equal to the CONNECTING state.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Connecting

      public Connecting()
      Tries to initialize the client.
  • Method Details

    • action

      public void action()
      Whilst the client is not connected tries to connect.This can also throw an exception further up the call stack if the server does not exist.
      Specified by:
      action in interface lejos.robotics.subsumption.Behavior
    • suppress

      public void suppress()
      Suppress function does nothing here.
      Specified by:
      suppress in interface lejos.robotics.subsumption.Behavior
    • takeControl

      public boolean takeControl()
      Takes control when the state is equal to the CONNECTING state.
      Specified by:
      takeControl in interface lejos.robotics.subsumption.Behavior
      Returns:
      boolean