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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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.void
suppress()
Suppress function does nothing here.boolean
Takes 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:
action
in interfacelejos.robotics.subsumption.Behavior
-
suppress
public void suppress()Suppress function does nothing here.- Specified by:
suppress
in interfacelejos.robotics.subsumption.Behavior
-
takeControl
public boolean takeControl()Takes control when the state is equal to the CONNECTING state.- Specified by:
takeControl
in interfacelejos.robotics.subsumption.Behavior
- Returns:
- boolean
-