Class MapRouletteConnection
- java.lang.Object
-
- org.maproulette.client.connection.MapRouletteConnection
-
- All Implemented Interfaces:
IMapRouletteConnection
public class MapRouletteConnection extends java.lang.Object implements IMapRouletteConnection
The connection class that actually makes the Rest request to the MapRoulette server.
-
-
Constructor Summary
Constructors Constructor Description MapRouletteConnection(MapRouletteConfiguration configuration)MapRouletteConnection(MapRouletteConfiguration configuration, ResourceFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>execute(Query query)A generic execute function that willbooleanisAbleToConnectToMapRoulette()Function used to check whether you can actually make a connection to the a MapRoulette server
-
-
-
Constructor Detail
-
MapRouletteConnection
public MapRouletteConnection(MapRouletteConfiguration configuration, ResourceFactory factory)
-
MapRouletteConnection
public MapRouletteConnection(MapRouletteConfiguration configuration)
-
-
Method Detail
-
execute
public java.util.Optional<java.lang.String> execute(Query query) throws MapRouletteException
Description copied from interface:IMapRouletteConnectionA generic execute function that will- Specified by:
executein interfaceIMapRouletteConnection- Parameters:
query- The query to execute against the MapRoulette Server- Returns:
- A list of strings that would then need to be transformed by the caller
- Throws:
MapRouletteException- Any exceptions that occur while trying to list the data
-
isAbleToConnectToMapRoulette
public boolean isAbleToConnectToMapRoulette()
Description copied from interface:IMapRouletteConnectionFunction used to check whether you can actually make a connection to the a MapRoulette server- Specified by:
isAbleToConnectToMapRoulettein interfaceIMapRouletteConnection- Returns:
- True if connection is successful
-
-