Advertisement
loloof64

ChessMoveService (Upnp application)

Apr 20th, 2013
338
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5 0.82 KB | None | 0 0
  1. package com.loloof64.j2se.cling_chess_exp;
  2.  
  3. import org.teleal.cling.binding.annotations.UpnpAction;
  4. import org.teleal.cling.binding.annotations.UpnpInputArgument;
  5. import org.teleal.cling.binding.annotations.UpnpService;
  6. import org.teleal.cling.binding.annotations.UpnpServiceId;
  7. import org.teleal.cling.binding.annotations.UpnpServiceType;
  8. import org.teleal.cling.binding.annotations.UpnpStateVariable;
  9.  
  10. @UpnpService(
  11. serviceId=@UpnpServiceId("ChessMove"),
  12. serviceType=@UpnpServiceType(value="ChessMove", version=1)
  13. )
  14. public class ChessMoveService {
  15.     @UpnpStateVariable(name="LastMove")
  16.     private int compactedLastMove;
  17.    
  18.     @UpnpAction(name="ChangeTo")
  19.     public void changeTo(
  20.             @UpnpInputArgument(name="CompactedValue", stateVariable="LastMove")
  21.             int compactedMove
  22.     ){
  23.         compactedLastMove = compactedMove;
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement