Class NotificationImpl

java.lang.Object
com.oracle.cloud.spring.notification.NotificationImpl
All Implemented Interfaces:
Notification

public class NotificationImpl extends Object implements Notification
Implementation for the OCI Notification module.
  • Constructor Details

    • NotificationImpl

      public NotificationImpl(com.oracle.bmc.ons.NotificationDataPlane notificationDataPlane, com.oracle.bmc.ons.NotificationControlPlane notificationControlPlane)
  • Method Details

    • getNotificationDataPlaneClient

      public com.oracle.bmc.ons.NotificationDataPlane getNotificationDataPlaneClient()
      Direct instance of OCI Java SDK NotificationDataPlane Client.
      Specified by:
      getNotificationDataPlaneClient in interface Notification
      Returns:
      NotificationDataPlane
    • getNotificationControlPlaneClient

      public com.oracle.bmc.ons.NotificationControlPlane getNotificationControlPlaneClient()
      Direct instance of OCI Java SDK NotificationControlPlane Client.
      Specified by:
      getNotificationControlPlaneClient in interface Notification
      Returns:
      NotificationControlPlane
    • publishMessage

      public com.oracle.bmc.ons.responses.PublishMessageResponse publishMessage(String topicId, String title, String message)
      Publish message to a Topic.
      Specified by:
      publishMessage in interface Notification
      Parameters:
      topicId - OCID of the topic
      title - Message title
      message - Message content
      Returns:
      PublishMessageResponse
    • createSubscription

      public com.oracle.bmc.ons.responses.CreateSubscriptionResponse createSubscription(String compartmentId, String topicId, String protocol, String endpoint)
      Creates a Notification subscription in a Topic.
      Specified by:
      createSubscription in interface Notification
      Parameters:
      compartmentId - Compartment OCID where the Subscription needs to be created
      topicId - Topic OCID where the Subscription needs to be created
      protocol - Subscription type. Ex: EMAIL
      endpoint - Subscription endpoint. Ex: Email ID in case of EMAIL as protocol
      Returns:
      CreateSubscriptionResponse
    • getSubscription

      public String getSubscription(String subscriptionId)
      Get the Subscription Resource JSON as a String.
      Specified by:
      getSubscription in interface Notification
      Parameters:
      subscriptionId - OCID of the subscription
      Returns:
      String
    • listSubscriptions

      public String listSubscriptions(String topicId, String compartmentId)
      List subscriptions in a Topic as a JSON String.
      Specified by:
      listSubscriptions in interface Notification
      Parameters:
      topicId - Topic OCID where to list the Subscriptions
      compartmentId - Compartment OCID where the topic is present
      Returns:
      String
    • createTopic

      public com.oracle.bmc.ons.responses.CreateTopicResponse createTopic(String topicName, String compartmentId)
      Creates an OCI Notification Topic.
      Specified by:
      createTopic in interface Notification
      Parameters:
      topicName - Name of the Topic to be created
      compartmentId - Compartment OCID where the Topic needs to be created
      Returns:
      CreateTopicResponse