Package behaviors
Class Connecting
java.lang.Object
behaviors.Connecting
- All Implemented Interfaces:
lejos.robotics.subsumption.Behavior
Connects to the Java server through the SingleClient.
- Since:
- 2023
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaction()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.voidsuppress()Suppress function does nothing here.booleanTakes control when the state is equal to the CONNECTING state.
-
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:
actionin interfacelejos.robotics.subsumption.Behavior
-
suppress
public void suppress()Suppress function does nothing here.- Specified by:
suppressin interfacelejos.robotics.subsumption.Behavior
-
takeControl
public boolean takeControl()Takes control when the state is equal to the CONNECTING state.- Specified by:
takeControlin interfacelejos.robotics.subsumption.Behavior- Returns:
- boolean
-