@Controller
public class MainApp
extends java.lang.Object
Constructor and Description |
---|
MainApp() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getExchange(org.springframework.ui.Model model)
Redirect the user to the "exchange" template by retrieving the session
|
java.lang.String |
getIndex()
Redirect to template "index"
|
java.lang.String |
postSynch(java.lang.String token)
Synchronize the mobile session with the desktop through the token
|
void |
sendClick(java.lang.String clickJson,
java.security.Principal principal)
Send data from click sensor
|
void |
sendGyroscope(java.lang.String gyrosJson,
java.security.Principal principal)
Send data from gyroscope sensor
|
@GetMapping(value="/") public java.lang.String getIndex()
@PostMapping(value="/synch") public java.lang.String postSynch(@RequestParam(value="token") java.lang.String token)
token
- @GetMapping(value="/exchange") public java.lang.String getExchange(org.springframework.ui.Model model)
model
- @MessageMapping(value="/dataMobile/gyroscope") public void sendGyroscope(java.lang.String gyrosJson, java.security.Principal principal) throws java.lang.Exception
gyrosJson
- principal
- java.lang.Exception
@MessageMapping(value="/dataMobile/click") public void sendClick(java.lang.String clickJson, java.security.Principal principal) throws java.lang.Exception
clickJson
- principal
- java.lang.Exception