Skip to content

Commit

Permalink
fix documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
kosyloa committed Apr 15, 2024
1 parent dc2d3e4 commit 7d425e7
Show file tree
Hide file tree
Showing 24 changed files with 96 additions and 97 deletions.
40 changes: 20 additions & 20 deletions DXFeedFramework/Api/DXEndpoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public class DXEndpoint {

/// Returns a set of all event types supported by this endpoint. The resulting set cannot be modified.
///
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func getEventTypes() throws -> [EventCode] {
return try endpointNative.getEventTypes()
}
Expand Down Expand Up @@ -260,7 +260,7 @@ public class DXEndpoint {
/// - Parameters:
/// - address: The data source address.
/// - Returns: ``DXEndpoint``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
@discardableResult public func connect(_ address: String) throws -> Self {
try self.endpointNative.connect(address)
return self
Expand All @@ -276,7 +276,7 @@ public class DXEndpoint {
/// ``connect(_:)`` method or was disconnected with ``disconnect()`` method.
/// The method initiates a short-path way for reconnecting, so whether listeners will have a chance to see
/// an intermediate state ``DXEndpointState/notConnected`` depends on the implementation.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func reconnect() throws {
try self.endpointNative.reconnect()
}
Expand All @@ -286,7 +286,7 @@ public class DXEndpoint {
/// The endpoint ``getState()`` immediately becomes ``DXEndpointState/notConnected`` otherwise.
/// This method does not release all resources that are associated with this endpoint.
/// Use ``close()`` or ``closeAndAwaitTermination()`` methods to release all resources.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func disconnect() throws {
try self.endpointNative.disconnect()
}
Expand All @@ -296,7 +296,7 @@ public class DXEndpoint {
/// The endpoint``getState()`` immediately becomes``DXEndpointState/notConnected`` otherwise.
/// This method does not release all resources that are associated with this endpoint.
/// Use ``close()`` or ``closeAndAwaitTermination()`` methods to release all resources.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func disconnectAndClear() throws {
try self.endpointNative.disconnectAndClear()
}
Expand All @@ -305,7 +305,7 @@ public class DXEndpoint {
/// All network connection are terminated as with ``disconnect()``
/// method and no further connections can be established.
/// The endpoint ``getState()`` immediately becomes ``DXEndpointState/closed``.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func close() throws {
try self.endpointNative.close()
}
Expand All @@ -329,7 +329,7 @@ public class DXEndpoint {
/// - Parameters:
/// - password: The user password.
/// - Returns: ``DXEndpoint``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func set(password: String) throws -> Self {
try endpointNative.set(password: password)
return self
Expand All @@ -341,7 +341,7 @@ public class DXEndpoint {
/// - Parameters:
/// - userName: The user name.
/// - Returns: ``DXEndpoint``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func set(userName: String) throws -> Self {
try endpointNative.set(userName: userName)
return self
Expand All @@ -351,7 +351,7 @@ public class DXEndpoint {
/// This is important when writing data to file via "tape:..." connector to make sure that
/// all published data was written before closing this endpoint.
/// **This method is blocking.**
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func awaitProcessed() throws {
try endpointNative.awaitProcessed()
}
Expand All @@ -362,30 +362,30 @@ public class DXEndpoint {
/// processed by the corresponding subscription listeners. Use ``closeAndAwaitTermination()`` after
/// this method returns to make sure that all processing has completed.
/// **This method is blocking.**
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func awaitNotConnected() throws {
try endpointNative.awaitNotConnected()
}

/// Gets the ``DXEndpointState`` of this endpoint.
/// - Returns: ``DXEndpointState``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func getState() throws -> DXEndpointState {
return try endpointNative.getState()
}
/// Creates an endpoint with a role.
/// - Parameters:
/// - role: Role for endpoint. Default: ``DXEndpoint/Role-swift.enum/feed``
/// - Returns: The created ``DXEndpoint`` instance.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public static func create(_ role: Role = .feed) throws -> DXEndpoint {
return try Builder().withRole(role).build()
}

/// Gets a default application-wide singleton instance of DXEndpoint with a ``DXEndpoint/Role-swift.enum/feed`` role.
/// Most applications use only a single data-source and should rely on this method to get one.
/// - Returns: Returns singleton instance of ``DXEndpoint``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public static func getInstance(_ role: Role = .feed) throws -> DXEndpoint {
defer {
objc_sync_exit(self)
Expand All @@ -404,7 +404,7 @@ public class DXEndpoint {
/// Builder class for ``DXEndpoint`` that supports additional configuration properties.
///
/// Porting a Java class com.dxfeed.api.DXEndpoint.Builder.
/// For more details see [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXEndpoint.Builder.html)
/// For more details see [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXEndpoint.Builder.html)
///
/// The ``build()`` method tries to load the default property file for the ``DXEndpoint/Role-swift.enum/feed``,
/// ``DXEndpoint/Role-swift.enum/onDemandFeed`` and ``DXEndpoint/Role-swift.enum/publisher`` role.
Expand Down Expand Up @@ -450,7 +450,7 @@ public class Builder {
/// - Parameters:
/// - name: The endpoint name.
/// - Returns: Returns this ``Builder``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func withName(_ name: String) throws -> Self {
return try withProperty(DXEndpoint.Property.name.rawValue, name)
}
Expand All @@ -460,7 +460,7 @@ public class Builder {
/// - Parameters:
/// - role: The endpoint role ``DXEndpoint/Role-swift.enum``.
/// - Returns: Returns this ``Builder``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func withRole(_ role: Role) throws -> Self {
self.role = role
_ = try nativeBuilder?.withRole(role)
Expand All @@ -471,7 +471,7 @@ public class Builder {
/// - Parameters:
/// - proeprty: Property name
/// - Returns: Returns Bool
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func isSupported(_ property: String) throws -> Bool {
return try nativeBuilder?.isSuppored(property: property) ?? false
}
Expand All @@ -481,7 +481,7 @@ public class Builder {
/// - key: Property name
/// - value: Property value
/// - Returns: Returns this ``Builder``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func withProperty(_ key: String, _ value: String) throws -> Self {
props[key] = value
try nativeBuilder?.withProperty(key, value)
Expand All @@ -492,7 +492,7 @@ public class Builder {
/// - Parameters:
/// - properties: The key-value collection
/// - Returns: Returns this ``Builder``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func withProperties(_ properties: [String: String]) throws -> Self {
try properties.forEach { key, value in
_ = try withProperty(key, value)
Expand All @@ -503,7 +503,7 @@ public class Builder {
/// Builds ``DXEndpoint`` instance.
/// This method tries to load default properties file.
/// - Returns: Returns this ``DXEndpoint``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func build() throws -> DXEndpoint {
return try DXEndpoint(native: try nativeBuilder!.build(), role: role, name: getOrCreateEndpointName())
}
Expand Down
10 changes: 5 additions & 5 deletions DXFeedFramework/Api/DXFeed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class DXFeed {
}
/// Creates new subscription for a list of event types that is attached to this feed.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeed.html#createSubscription-java.lang.Class)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeed.html#createSubscription-java.lang.Class)
/// - Parameters:
/// - types: The list of event types.
/// - Returns: ``DXFeedSubscription``
Expand All @@ -39,19 +39,19 @@ public class DXFeed {
}
/// Creates new subscription for a one event type that is attached to this feed.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeed.html#createSubscription-java.lang.Class)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeed.html#createSubscription-java.lang.Class)
/// - Parameters:
/// - type: event code
/// - Returns: ``DXFeedSubscription``
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func createSubscription(_ type: IEventType.Type) throws -> DXFeedSubscription {
return try DXFeedSubscription(native: native.createSubscription(type), types: [type])
}

/// Creates new time series subscription for a single event type that is <i>attached</i> to this feed.
/// For multiple event types in one subscription use
/// ``createTimeSeriesSubscription(_:)-tuiu``
/// This method creates new ``DXFeedTimeSeriesSubscription`` and invokes ``attachSubscription``.
/// This method creates new ``DXFeedTimeSeriesSubscription`` and invokes ``attach(subscription:)``.
///
/// - Parameters:
/// - types: The list of ITimeSeriesEvent.
Expand All @@ -65,7 +65,7 @@ public class DXFeed {
/// Creates new time series subscription for a single event type that is <i>attached</i> to this feed.
/// For multiple event types in one subscription use
/// ``createTimeSeriesSubscription(_:)-tuiu``
/// This method creates new ``DXFeedTimeSeriesSubscription`` and invokes ``attachSubscription``.
/// This method creates new ``DXFeedTimeSeriesSubscription`` and invokes ``attach(subscription:)``.
///
/// - Parameters:
/// - type: type of ITimeSeriesEvent.
Expand Down
26 changes: 13 additions & 13 deletions DXFeedFramework/Api/DXFeedSubscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class DXFeedSubscription {
/// or not attached to any feed.
/// This method does nothing if this subscription is closed.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addEventListener-com.dxfeed.api.DXFeedEventListener)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addEventListener-com.dxfeed.api.DXFeedEventListener)
/// - Throws: ``GraalException`` Rethrows exception from Java, ``ArgumentException/argumentNil``
public func add<O>(listener: O) throws
where O: DXEventListener,
Expand All @@ -51,7 +51,7 @@ public class DXFeedSubscription {
}
/// Removes listener for events.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addEventListener-com.dxfeed.api.DXFeedEventListener-)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addEventListener-com.dxfeed.api.DXFeedEventListener-)
public func remove<O>(listener: O)
where O: DXEventListener,
O: Hashable {
Expand All @@ -63,10 +63,10 @@ public class DXFeedSubscription {
/// All registered event listeners will receive update on the last events for
/// newly added symbol.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addSymbols-java.util.Collection-)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addSymbols-java.util.Collection-)
/// - Parameters:
/// - symbol: One symbol
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func addSymbols(_ symbol: Symbol) throws {
try native.addSymbols(symbol)
}
Expand All @@ -76,20 +76,20 @@ public class DXFeedSubscription {
/// All registered event listeners will receive update on the last events for all
/// newly added symbols.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addSymbols-java.util.Collection-)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#addSymbols-java.util.Collection-)
/// - Parameters:
/// - symbol: The collection of symbols.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func addSymbols(_ symbols: [Symbol]) throws {
try native.addSymbols(symbols)
}

/// Removes the specified collection of symbols from the set of subscribed symbols.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#removeSymbols-java.util.Collection-)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#removeSymbols-java.util.Collection-)
/// - Parameters:
/// - symbol: The collection of symbols.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func removeSymbols(_ symbols: [Symbol]) throws {
try native.removeSymbols(symbols)
}
Expand All @@ -99,18 +99,18 @@ public class DXFeedSubscription {
/// All registered event listeners will receive update on the last events for all
/// newly added symbols.
///
/// [Javadoc](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#setSymbols-java.util.Collection-)
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXFeedSubscription.html#setSymbols-java.util.Collection-)
/// - Parameters:
/// - symbol: The collection of symbols.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func setSymbols(_ symbols: [Symbol]) throws {
try native.setSymbols(symbols)
}

/// Returns a set of subscribed symbols.
///
/// - Returns: The collection of symbols.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func getSymbols() throws -> [Symbol] {
return try native.getSymbols()
}
Expand Down Expand Up @@ -166,7 +166,7 @@ public extension DXFeedSubscription {
///
/// - Parameters:
/// - feed: The ``DXFeed`` to attach to.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
func attach(feed: DXFeed) throws {
try native.attach(feed: feed.nativeFeed)
}
Expand All @@ -175,7 +175,7 @@ public extension DXFeedSubscription {
///
/// - Parameters:
/// - feed: The ``DXFeed`` to detach from.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
func detach(feed: DXFeed) throws {
try native.detach(feed: feed.nativeFeed)
}
Expand Down
4 changes: 2 additions & 2 deletions DXFeedFramework/Api/DXPublisher.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class DXPublisher {
/// [For more details see](https://docs.dxfeed.com/dxfeed/api/com/dxfeed/api/DXPublisher.html#publishEvents-java.util.Collection-)
/// - Parameters:
/// - events: The collection of events to publish.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func publish(events: [MarketEvent]) throws {
try native.publishEvents(events: events)
}
Expand All @@ -58,7 +58,7 @@ public class DXPublisher {
/// - Parameters:
/// - event: eventType the class of event.
/// - Returns: Observable subscription for the specified event type.
/// - Throws: GraalException. Rethrows exception from Java.
/// - Throws: ``GraalException``. Rethrows exception from Java.
public func getSubscription(_ event: IEventType.Type) throws -> IObservableSubscription {
if let subscription = subscriptionsByClass[event.type] {
return subscription
Expand Down
Loading

0 comments on commit 7d425e7

Please sign in to comment.