Interface Topic

All Superinterfaces:
Object

public interface Topic extends Object
Represents an IceStorm topic. Publishers publish data to a topic (via the topic's publisher object), and subscribers subscribe to a topic.
See Also:
  • Method Details

    • getName

      String getName(Current current)
      Gets the name of this topic.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      The name of the topic.
      See Also:
    • getPublisher

      ObjectPrx getPublisher(Current current)
      Gets a proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this operation and then creates a proxy with the publisher type from this proxy. If a replicated IceStorm deployment is used, this call may return a replicated proxy.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      A proxy to publish data on this topic. This proxy is never null.
    • getNonReplicatedPublisher

      ObjectPrx getNonReplicatedPublisher(Current current)
      Gets a non-replicated proxy to a publisher object for this topic. To publish data to a topic, a publisher calls this operation and then creates a proxy with the publisher type from this proxy.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      A proxy to publish data on this topic. This proxy is never null.
    • subscribeAndGetPublisher

      ObjectPrx subscribeAndGetPublisher(Map<String,String> theQoS, ObjectPrx subscriber, Current current) throws AlreadySubscribed, BadQoS
      Subscribes to this topic.
      Parameters:
      theQoS - The quality of service parameters for this subscription.
      subscriber - The subscriber's proxy. This proxy cannot be null.
      current - The Current object of the incoming request.
      Returns:
      The per-subscriber publisher proxy. This proxy is never null.
      Throws:
      AlreadySubscribed - Thrown when subscriber is already subscribed.
      BadQoS - Thrown when theQoS is unavailable or invalid.
      See Also:
    • unsubscribe

      void unsubscribe(ObjectPrx subscriber, Current current)
      Unsubscribes the provided subscriber from this topic.
      Parameters:
      subscriber - A proxy to an existing subscriber. This proxy is never null.
      current - The Current object of the incoming request.
      See Also:
    • link

      void link(TopicPrx linkTo, int cost, Current current) throws LinkExists
      Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
      Parameters:
      linkTo - The topic to link to. This proxy cannot be null.
      cost - The cost of the link.
      current - The Current object of the incoming request.
      Throws:
      LinkExists - Thrown when a link to linkTo already exists.
    • unlink

      void unlink(TopicPrx linkTo, Current current) throws NoSuchLink
      Destroys a link from this topic to the provided topic.
      Parameters:
      linkTo - The topic to destroy the link to. This proxy cannot be null.
      current - The Current object of the incoming request.
      Throws:
      NoSuchLink - Thrown when a link to linkTo does not exist.
    • getLinkInfoSeq

      LinkInfo[] getLinkInfoSeq(Current current)
      Gets information on the current links.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      A sequence of LinkInfo objects.
    • getSubscribers

      Identity[] getSubscribers(Current current)
      Gets the list of subscribers for this topic.
      Parameters:
      current - The Current object of the incoming request.
      Returns:
      The sequence of Ice identities for the subscriber objects.
    • destroy

      void destroy(Current current)
      Destroys this topic.
      Parameters:
      current - The Current object of the incoming request.
    • ice_staticId

      static String ice_staticId()
      Gets the type ID of the associated Slice interface.
      Returns:
      the string "::IceStorm::Topic"
    • dispatch

      default CompletionStage<OutgoingResponse> dispatch(IncomingRequest request) throws UserException
      Dispatches an incoming request to one of the methods of this generated interface, based on the operation name carried by the request.
      Specified by:
      dispatch in interface Object
      Parameters:
      request - the incoming request
      Returns:
      the outgoing response
      Throws:
      UserException - if a UserException is thrown, Ice will marshal it as the response payload.