Class SimulationInfoResource
java.lang.Object
info.mikethomas.fahservices.service.SimulationInfoResource
REST Web Service.
- Version:
- $Id: $Id
- Author:
- Michael Thomas (mikepthomas@outlook.com)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity
<info.mikethomas.jfold.simulation.SimulationInfo> getSimulationInfo
(int slot) Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.org.springframework.http.ResponseEntity
<Exception> handleException.
-
Constructor Details
-
SimulationInfoResource
public SimulationInfoResource()
-
-
Method Details
-
getSimulationInfo
@RequestMapping(value="/simulation-info/{slot}", method=GET, produces={"application/json","application/xml","text/xml"}) @ResponseBody public org.springframework.http.ResponseEntity<info.mikethomas.jfold.simulation.SimulationInfo> getSimulationInfo(@PathVariable("slot") int slot) throws info.mikethomas.jfold.exceptions.SimulationInfoException Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.- Parameters:
slot
- Slot number- Returns:
- an instance of java.lang.String
- Throws:
info.mikethomas.jfold.exceptions.SimulationInfoException
- if any.
-
handleException
@ExceptionHandler(info.mikethomas.jfold.exceptions.SimulationInfoException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public org.springframework.http.ResponseEntity<Exception> handleException(Exception ex) handleException.
- Parameters:
ex
- aException
object- Returns:
- a
ResponseEntity
object
-