Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2016
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.28 KB | None | 0 0
  1. public class NotificationRpcApi implements IRpcApi
  2. {
  3.     private final NotificationRpcApi.Uris uris;
  4.  
  5.     public NotificationRpcApi()
  6.     {
  7.         uris = new Uris();
  8.     }
  9.  
  10.     @Override
  11.     public RpcApiInfo info()
  12.     {
  13.         return new RpcApiInfo("Notification Service", "1.0.0", uris.BaseUri);
  14.     }
  15.  
  16.     @Override
  17.     public Map<String, IRpcCallHandler> getCallHandlers()
  18.     {
  19.         //...//
  20.         return new HashMap<>();
  21.     }
  22.  
  23.     public class Uris
  24.     {
  25.         private final String BaseUri = "/api/notification";
  26.         private final String Notify = BaseUri + "/notify";
  27.         private final String Subscribe = BaseUri + "/subscribe";
  28.         private final String Unsubscribe = BaseUri + "/unsubscribe";
  29.         private final String GetNotificationTypes = BaseUri + "/notificationTypes";
  30.  
  31.         public String BaseUri()
  32.         {
  33.             return BaseUri();
  34.         }
  35.  
  36.         public String Notify()
  37.         {
  38.             return Notify;
  39.         }
  40.  
  41.         public String Subscribe()
  42.         {
  43.             return Subscribe;
  44.         }
  45.  
  46.         public String Unsubscribe()
  47.         {
  48.             return Unsubscribe;
  49.         }
  50.  
  51.         public String GetNotificationType()
  52.         {
  53.             return GetNotificationTypes;
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement