Class SlotInfoResource

java.lang.Object
info.mikethomas.fahservices.service.SlotInfoResource

@RestController("slot-info") public class SlotInfoResource extends Object
REST Web Service.
Version:
$Id: $Id
Author:
Michael Thomas (mikepthomas@outlook.com)
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.http.ResponseEntity<List<info.mikethomas.jfold.slot.Slot>>
    Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.
    org.springframework.http.ResponseEntity<info.mikethomas.jfold.slot.Slot>
    getSlotInfo(int slot)
    Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.
    org.springframework.http.ResponseEntity<Exception>
    handleException.

    Methods inherited from class java.lang.Object

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

    • SlotInfoResource

      public SlotInfoResource()
  • Method Details

    • getSlotInfo

      @RequestMapping(value="/slot-info", method=GET, produces={"application/json","application/xml","text/xml"}) @ResponseBody public org.springframework.http.ResponseEntity<List<info.mikethomas.jfold.slot.Slot>> getSlotInfo() throws info.mikethomas.jfold.exceptions.SlotInfoException
      Retrieves representation of an instance of info.mikethomas.fahservices.service.SlotInfoResource.
      Returns:
      an instance of java.lang.String
      Throws:
      info.mikethomas.jfold.exceptions.SlotInfoException - if any.
    • getSlotInfo

      @RequestMapping(value="/slot-info/{slot}", method=GET, produces={"application/json","application/xml","text/xml"}) @ResponseBody public org.springframework.http.ResponseEntity<info.mikethomas.jfold.slot.Slot> getSlotInfo(@PathVariable("slot") int slot) throws info.mikethomas.jfold.exceptions.SlotInfoException
      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.SlotInfoException - if any.
    • handleException

      @ExceptionHandler(info.mikethomas.jfold.exceptions.SlotInfoException.class) @ResponseStatus(INTERNAL_SERVER_ERROR) public org.springframework.http.ResponseEntity<Exception> handleException(Exception ex)

      handleException.

      Parameters:
      ex - a Exception object
      Returns:
      a ResponseEntity object