IceStorm package¶
Module contents¶
- exception IceStorm.AlreadySubscribed¶
Bases:
UserException
The exception that is thrown when attempting to subscribe a proxy for which a subscription already exists.
- Return type:
None
- exception IceStorm.BadQoS(reason: str = '')¶
Bases:
UserException
The exception that is thrown when attempting to subscribe with an invalid
QoS
.- Parameters:
reason (str)
- Return type:
None
- reason¶
The reason for the failure.
- Type:
str
- class IceStorm.Finder¶
Bases:
Object
,ABC
- abstractmethod getTopicManager(current: Current) TopicManagerPrx | None | Awaitable[TopicManagerPrx | None] ¶
Gets a proxy to the associated
IceStorm.TopicManagerPrx
. The proxy might point to several replicas.- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The topic manager proxy. This proxy is never null.
- Return type:
TopicManagerPrx | None | Awaitable[TopicManagerPrx | None]
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- class IceStorm.FinderPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) FinderPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[FinderPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- getTopicManager(context: dict[str, str] | None = None) TopicManagerPrx | None ¶
Gets a proxy to the associated
IceStorm.TopicManagerPrx
. The proxy might point to several replicas.- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The topic manager proxy. This proxy is never null.
- Return type:
TopicManagerPrx | None
- getTopicManagerAsync(context: dict[str, str] | None = None) Awaitable[TopicManagerPrx | None] ¶
Gets a proxy to the associated
IceStorm.TopicManagerPrx
. The proxy might point to several replicas.- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The topic manager proxy. This proxy is never null.
- Return type:
Awaitable[TopicManagerPrx | None]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- exception IceStorm.LinkExists(name: str = '')¶
Bases:
UserException
The exception that is thrown when attempting to create a link that already exists.
- Parameters:
name (str)
- Return type:
None
- name¶
The name of the linked topic.
- Type:
str
- class IceStorm.LinkInfo(theTopic: TopicPrx | None = None, name: str = '', cost: int = 0)¶
Bases:
object
Information about a topic link.
- Parameters:
theTopic (TopicPrx | None)
name (str)
cost (int)
- name¶
The name of the linked topic.
- Type:
str
- cost¶
The cost of traversing this link.
- Type:
int
- exception IceStorm.NoSuchLink(name: str = '')¶
Bases:
UserException
The exception that is thrown when attempting to remove a link that does not exist.
- Parameters:
name (str)
- Return type:
None
- name¶
The name of the link that does not exist.
- Type:
str
- exception IceStorm.NoSuchTopic(name: str = '')¶
Bases:
UserException
The exception that is thrown when attempting to retrieve a topic that does not exist.
- Parameters:
name (str)
- Return type:
None
- name¶
The name of the topic that does not exist.
- Type:
str
- class IceStorm.Topic¶
Bases:
Object
,ABC
- abstractmethod destroy(current: Current) None | Awaitable[None] ¶
Destroys this topic.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- abstractmethod getLinkInfoSeq(current: Current) Sequence[LinkInfo] | Awaitable[Sequence[LinkInfo]] ¶
Gets information on the current links.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A sequence of LinkInfo objects.
- Return type:
- abstractmethod getName(current: Current) str | Awaitable[str] ¶
Gets the name of this topic.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The name of the topic.
- Return type:
str | Awaitable[str]
- abstractmethod getNonReplicatedPublisher(current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
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 (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
- abstractmethod getPublisher(current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
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 (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
- abstractmethod getSubscribers(current: Current) Sequence[Identity] | Awaitable[Sequence[Identity]] ¶
Gets the list of subscribers for this topic.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The sequence of Ice identities for the subscriber objects.
- Return type:
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod link(linkTo: TopicPrx | None, cost: int, current: Current) None | Awaitable[None] ¶
Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to link to. This proxy cannot be null.
cost (int) – The cost of the link.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
LinkExists – Thrown when a link to
linkTo
already exists.
- abstractmethod subscribeAndGetPublisher(theQoS: dict[str, str], subscriber: ObjectPrx | None, current: Current) ObjectPrx | None | Awaitable[ObjectPrx | None] ¶
Subscribes to this topic.
- Parameters:
theQoS (dict[str, str]) – The quality of service parameters for this subscription.
subscriber (ObjectPrx | None) – The subscriber’s proxy. This proxy cannot be null.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
The per-subscriber publisher proxy. This proxy is never null.
- Return type:
- Raises:
AlreadySubscribed – Thrown when
subscriber
is already subscribed.BadQoS – Thrown when
theQoS
is unavailable or invalid.
- abstractmethod unlink(linkTo: TopicPrx | None, current: Current) None | Awaitable[None] ¶
Destroys a link from this topic to the provided topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to destroy the link to. This proxy cannot be null.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- Raises:
NoSuchLink – Thrown when a link to
linkTo
does not exist.
- abstractmethod unsubscribe(subscriber: ObjectPrx | None, current: Current) None | Awaitable[None] ¶
Unsubscribes the provided
subscriber
from this topic.- Parameters:
subscriber (ObjectPrx | None) – A proxy to an existing subscriber. This proxy is never null.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
None or an awaitable that completes when the dispatch completes.
- Return type:
None | Awaitable[None]
- exception IceStorm.TopicExists(name: str = '')¶
Bases:
UserException
The exception that is thrown when attempting to create a topic that already exists.
- Parameters:
name (str)
- Return type:
None
- name¶
The name of the topic that already exists.
- Type:
str
- class IceStorm.TopicManager¶
Bases:
Object
,ABC
- abstractmethod create(name: str, current: Current) TopicPrx | None | Awaitable[TopicPrx | None] ¶
Creates a new topic.
- Parameters:
name (str) – The name of the topic.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the new topic object. The returned proxy is never null.
- Return type:
- Raises:
TopicExists – Thrown when a topic with the same
name
already exists.
- static ice_staticId() str ¶
Obtain the type ID of the Slice interface.
- Returns:
The type ID.
- Return type:
str
- abstractmethod retrieve(name: str, current: Current) TopicPrx | None | Awaitable[TopicPrx | None] ¶
Retrieves a topic by name.
- Parameters:
name (str) – The name of the topic.
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A proxy to the topic object. The returned proxy is never null.
- Return type:
- Raises:
NoSuchTopic – Thrown when there is no topic named
name
.
- abstractmethod retrieveAll(current: Current) Mapping[str, TopicPrx | None] | Awaitable[Mapping[str, TopicPrx | None]] ¶
Retrieves all topics managed by this topic manager.
- Parameters:
current (Ice.Current) – The Current object for the dispatch.
- Returns:
A dictionary of string, topic proxy pairs.
- Return type:
Mapping[str, TopicPrx | None] | Awaitable[Mapping[str, TopicPrx | None]]
- class IceStorm.TopicManagerPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) TopicManagerPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[TopicManagerPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- create(name: str, context: dict[str, str] | None = None) TopicPrx | None ¶
Creates a new topic.
- Parameters:
name (str) – The name of the topic.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the new topic object. The returned proxy is never null.
- Return type:
TopicPrx | None
- Raises:
TopicExists – Thrown when a topic with the same
name
already exists.
- createAsync(name: str, context: dict[str, str] | None = None) Awaitable[TopicPrx | None] ¶
Creates a new topic.
- Parameters:
name (str) – The name of the topic.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the new topic object. The returned proxy is never null.
- Return type:
Awaitable[TopicPrx | None]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- retrieve(name: str, context: dict[str, str] | None = None) TopicPrx | None ¶
Retrieves a topic by name.
- Parameters:
name (str) – The name of the topic.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the topic object. The returned proxy is never null.
- Return type:
TopicPrx | None
- Raises:
NoSuchTopic – Thrown when there is no topic named
name
.
- retrieveAll(context: dict[str, str] | None = None) dict[str, TopicPrx | None] ¶
Retrieves all topics managed by this topic manager.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A dictionary of string, topic proxy pairs.
- Return type:
dict[str, TopicPrx | None]
- retrieveAllAsync(context: dict[str, str] | None = None) Awaitable[dict[str, TopicPrx | None]] ¶
Retrieves all topics managed by this topic manager.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A dictionary of string, topic proxy pairs.
- Return type:
Awaitable[dict[str, TopicPrx | None]]
- retrieveAsync(name: str, context: dict[str, str] | None = None) Awaitable[TopicPrx | None] ¶
Retrieves a topic by name.
- Parameters:
name (str) – The name of the topic.
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to the topic object. The returned proxy is never null.
- Return type:
Awaitable[TopicPrx | None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) TopicManagerPrx | None ¶
Creates a new proxy from an existing proxy.
- class IceStorm.TopicPrx¶
Bases:
ObjectPrx
- static checkedCast(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) TopicPrx | None ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- static checkedCastAsync(proxy: ObjectPrx | None, facet: str | None = None, context: dict[str, str] | None = None) Awaitable[TopicPrx | None] ¶
Creates a new proxy from an existing proxy after confirming the target object’s type via a remote invocation.
- Parameters:
proxy (ObjectPrx | None) – The source proxy.
facet (str, optional) – A facet name.
context (dict[str, str], optional) – The request context.
- Returns:
A new proxy with the requested type, or None if the source proxy is None or if the target object does not support the requested type.
- Return type:
ObjectPrx | None
- destroy(context: dict[str, str] | None = None) None ¶
Destroys this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- destroyAsync(context: dict[str, str] | None = None) Awaitable[None] ¶
Destroys this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- getLinkInfoSeq(context: dict[str, str] | None = None) list[LinkInfo] ¶
Gets information on the current links.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A sequence of LinkInfo objects.
- Return type:
list[LinkInfo]
- getLinkInfoSeqAsync(context: dict[str, str] | None = None) Awaitable[list[LinkInfo]] ¶
Gets information on the current links.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A sequence of LinkInfo objects.
- Return type:
Awaitable[list[LinkInfo]]
- getName(context: dict[str, str] | None = None) str ¶
Gets the name of this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The name of the topic.
- Return type:
str
- getNameAsync(context: dict[str, str] | None = None) Awaitable[str] ¶
Gets the name of this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The name of the topic.
- Return type:
Awaitable[str]
- getNonReplicatedPublisher(context: dict[str, str] | None = None) ObjectPrx | None ¶
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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
ObjectPrx | None
- getNonReplicatedPublisherAsync(context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- getPublisher(context: dict[str, str] | None = None) ObjectPrx | None ¶
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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
ObjectPrx | None
- getPublisherAsync(context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
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:
context (dict[str, str]) – The request context for the invocation.
- Returns:
A proxy to publish data on this topic. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- getSubscribers(context: dict[str, str] | None = None) list[Identity] ¶
Gets the list of subscribers for this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The sequence of Ice identities for the subscriber objects.
- Return type:
list[Identity]
- getSubscribersAsync(context: dict[str, str] | None = None) Awaitable[list[Identity]] ¶
Gets the list of subscribers for this topic.
- Parameters:
context (dict[str, str]) – The request context for the invocation.
- Returns:
The sequence of Ice identities for the subscriber objects.
- Return type:
Awaitable[list[Identity]]
- static ice_staticId() str ¶
Gets the Slice type ID of the interface associated with this proxy.
- Returns:
The type ID, “::Ice::Object”.
- Return type:
str
- link(linkTo: TopicPrx | None, cost: int, context: dict[str, str] | None = None) None ¶
Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to link to. This proxy cannot be null.
cost (int) – The cost of the link.
context (dict[str, str]) – The request context for the invocation.
- Raises:
LinkExists – Thrown when a link to
linkTo
already exists.- Return type:
None
- linkAsync(linkTo: TopicPrx | None, cost: int, context: dict[str, str] | None = None) Awaitable[None] ¶
Creates a link to another topic. All events originating on this topic will also be sent to the other topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to link to. This proxy cannot be null.
cost (int) – The cost of the link.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- subscribeAndGetPublisher(theQoS: Mapping[str, str], subscriber: ObjectPrx | None, context: dict[str, str] | None = None) ObjectPrx | None ¶
Subscribes to this topic.
- Parameters:
theQoS (Mapping[str, str]) – The quality of service parameters for this subscription.
subscriber (ObjectPrx | None) – The subscriber’s proxy. This proxy cannot be null.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The per-subscriber publisher proxy. This proxy is never null.
- Return type:
ObjectPrx | None
- Raises:
AlreadySubscribed – Thrown when
subscriber
is already subscribed.BadQoS – Thrown when
theQoS
is unavailable or invalid.
- subscribeAndGetPublisherAsync(theQoS: Mapping[str, str], subscriber: ObjectPrx | None, context: dict[str, str] | None = None) Awaitable[ObjectPrx | None] ¶
Subscribes to this topic.
- Parameters:
theQoS (Mapping[str, str]) – The quality of service parameters for this subscription.
subscriber (ObjectPrx | None) – The subscriber’s proxy. This proxy cannot be null.
context (dict[str, str]) – The request context for the invocation.
- Returns:
The per-subscriber publisher proxy. This proxy is never null.
- Return type:
Awaitable[ObjectPrx | None]
- static uncheckedCast(proxy: ObjectPrx | None, facet: str | None = None) TopicPrx | None ¶
Creates a new proxy from an existing proxy.
- unlink(linkTo: TopicPrx | None, context: dict[str, str] | None = None) None ¶
Destroys a link from this topic to the provided topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to destroy the link to. This proxy cannot be null.
context (dict[str, str]) – The request context for the invocation.
- Raises:
NoSuchLink – Thrown when a link to
linkTo
does not exist.- Return type:
None
- unlinkAsync(linkTo: TopicPrx | None, context: dict[str, str] | None = None) Awaitable[None] ¶
Destroys a link from this topic to the provided topic.
- Parameters:
linkTo (TopicPrx | None) – The topic to destroy the link to. This proxy cannot be null.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]
- unsubscribe(subscriber: ObjectPrx | None, context: dict[str, str] | None = None) None ¶
Unsubscribes the provided
subscriber
from this topic.- Parameters:
subscriber (ObjectPrx | None) – A proxy to an existing subscriber. This proxy is never null.
context (dict[str, str]) – The request context for the invocation.
- Return type:
None
- unsubscribeAsync(subscriber: ObjectPrx | None, context: dict[str, str] | None = None) Awaitable[None] ¶
Unsubscribes the provided
subscriber
from this topic.- Parameters:
subscriber (ObjectPrx | None) – A proxy to an existing subscriber. This proxy is never null.
context (dict[str, str]) – The request context for the invocation.
- Returns:
An awaitable that is completed when the invocation completes.
- Return type:
Awaitable[None]