Interface AsyncTopic

All Superinterfaces:
Object

public interface AsyncTopic extends Object
Represents an IceStorm topic. Publishers publish data to a topic (via the topic's publisher object), and subscribers subscribe to a topic.

Remarks: The Slice compiler generated this skeleton interface from Slice interface ::IceStorm::Topic.

See Also:
  • Method Details

    • getNameAsync

      CompletionStage<String> getNameAsync(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:
    • getPublisherAsync

      CompletionStage<ObjectPrx> getPublisherAsync(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.
    • getNonReplicatedPublisherAsync

      CompletionStage<ObjectPrx> getNonReplicatedPublisherAsync(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.
    • subscribeAndGetPublisherAsync

      CompletionStage<ObjectPrx> subscribeAndGetPublisherAsync(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:
    • unsubscribeAsync

      CompletionStage<Void> unsubscribeAsync(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
      Returns:
      a completion stage that the servant will complete when the invocation completes
      See Also:
    • linkAsync

      CompletionStage<Void> linkAsync(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
      Returns:
      a completion stage that the servant will complete when the invocation completes
      Throws:
      LinkExists - Thrown when a link to linkTo already exists.
    • unlinkAsync

      CompletionStage<Void> unlinkAsync(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
      Returns:
      a completion stage that the servant will complete when the invocation completes
      Throws:
      NoSuchLink - Thrown when a link to linkTo does not exist.
    • getLinkInfoSeqAsync

      CompletionStage<LinkInfo[]> getLinkInfoSeqAsync(Current current)
      Gets information on the current links.
      Parameters:
      current - the Current object of the incoming request
      Returns:
      A sequence of LinkInfo objects.
    • getSubscribersAsync

      CompletionStage<Identity[]> getSubscribersAsync(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.
    • destroyAsync

      CompletionStage<Void> destroyAsync(Current current)
      Destroys this topic.
      Parameters:
      current - the Current object of the incoming request
      Returns:
      a completion stage that the servant will complete when the invocation completes
    • 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.