Guest User

Untitled

a guest
Aug 23rd, 2016
68
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×