A client used to subscribe to StreamBase streams and to send commands to the StreamBase Server.
Note:
This implementation is not synchronized. If instances of this class are accessed from multiple threads, access must be synchronized. With the exception of close(), the single threaded restriction dictates that no thread may reference the object - including enqueueing - while another thread is in dequeue(). If multiple threads subscribe to streams, it is recommended that they use separate instances of this class.

Namespace: StreamBase.SB.Client
Assembly: StreamBase.SB.Client (in StreamBase.SB.Client.dll) Version: 7.7.0.0

Syntax

         
 C#  Visual Basic  Visual C++ 
public class StreamBaseClient : IDisposable
Public Class StreamBaseClient _
	Implements IDisposable
public ref class StreamBaseClient : IDisposable

Members

            
 All Members  Constructors   Fields   Methods  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
StreamBaseClient()()()()
Creates a StreamBase client and establishes a connection to a remote server. Default values are selected for the URI to which to connect, the buffer size and flush interval to use.
StreamBaseClient(String)
Create a StreamBaseClient from one or more comma-separated URI strings. Default values are selected for the buffer size and flush interval to use.
StreamBaseClient(StreamBaseURI)
Creates a StreamBase client and establishes a connection to a remote server at the specified URI. Default values are selected for the buffer size and flush interval to use.
StreamBaseClient(array<StreamBaseURI>[]()[][])
Creates a StreamBase client and establishes connections at to the remote servers at the specified locations. Default values are selected for the buffer size and flush interval to use.
CanDequeue()()()()
Returns true if the client currently has tuples to dequeue.
Close()()()()
Terminate the client. May be invoked from a different thread. StreamBaseClient memory, network, and thread resources are not released until close() is called. Returns immediately.
DEFAULT_FLUSH_INTERVAL
Default value for EnableBuffering().
Dequeue()()()()
Dequeue tuples from any subscribed stream. This method blocks until
  • at least one tuple is available on any subscribed stream (DequeueResult.Status==GOOD), or
  • the node is shut down (DequeueResult.Status==CLOSED), or
  • a network error occurs(StreamBaseException is thrown)
If the node is shut down and no Tuples have been dequeued, the returned DequeueResult object will contain 0 Tuples and its Status property will be DequeueResult.CLOSED.
Note:
The DequeueResult will only contain valid data until Dequeue() is called again.
Dequeue(Int32)
Dequeue a batch of tuples from a subscribed stream. This method will block until:
  • at least one tuple is available on any subscribed stream (DequeueResult.Status==GOOD), or
  • nTimeoutMS milliseconds have elapsed (DequeueResult.Status==TIMEOUT), or
  • the node is shut down (DequeueResult.Status==CLOSED), or
  • a network error occurs(StreamBaseException is thrown)
An nTimeoutMS of zero will block indefinitely, or until a tuple arrives. Note that the actual dequeue timeout may vary based on normal thread scheduling, plus network interactions with the server.

If the request times out or the node is shut down and no Tuples have been dequeued, the returned DequeueResult object will contain 0 Tuples and its Status property will be DequeueResult.TIMEOUT or DequeueResult.CLOSED, respectively.

Note:
The DequeueResult will only contain valid data until Dequeue() is called again.
Describe(String)
Return an XML description of the named StreamBase entity
EnableBuffering(Int32)
Turn on buffering with a default flush value of 250ms.
EnableBuffering(Int32, Int32)
Turn on buffering. The WakeAndFlushBuffer thread is only started if nFlushIntervalInMS > 0.
EnableHeartbeating()()()()
Enables heartbeating for enqueue-only clients.
Enqueue(String, Tuple)
Enqueue a tuple to the named stream. The stream must not be tied to the output of any operator in the application. This method can block depending on network, or StreamBase server, congestion.

Note:
enqueue() will modify the tuple as it is enqueued. If you do not want the tuple modified you must make a copy of it before calling enqueue.
Enqueue(String, List<(Of <<'(Tuple>)>>))
Enqueue tuples to the named stream. The stream must not be tied to the output of any operator in the application. This method can block depending on network, or StreamBase server, congestion.
Note:
enqueue() will modify the tuple as it is enqueued. If you do not want the tuple modified you must make a copy of it before calling enqueue.
Enqueue(StreamProperties, Tuple)
Enqueue a tuple to a stream. The stream must not be tied to the output of any operator in the application. This method can block depending on network, or StreamBase server, congestion.

Note:
enqueue() will modify the tuple as it is enqueued. If you do not want the tuple modified you must make a copy of it before calling enqueue.
Enqueue(StreamProperties, List<(Of <<'(Tuple>)>>))
Enqueue tuples to a stream. The stream must not be tied to the output of any operator in the application. This method can block depending on network, or StreamBase server, congestion.
Note:
enqueue() will modify the tuple as it is enqueued. If you do not want the tuple modified you must make a copy of it before calling enqueue.
Equals(Object)
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
FlushAllBuffers()()()()
Flush any pending enqueue buffers. This operation has no effect if buffering is not enabled.
FlushBuffer(String)
Flush any pending enqueue buffer for the stream name provided. This operation has no effect if buffering is not enabled or there is no buffer to flush for the given stream.
FlushBuffer(StreamProperties)
Flush any pending enqueue buffer for the StreamProperties provided. This operation has no effect if buffering is not enabled or there is no buffer to flush for the given stream.
GetConnectionID()()()()
Return the Connection ID for this Client Connection. Only Valid once an enqueue/dequeue has been attempted.
GetDequeueResultInterceptor()()()()
Get the current dequeue results interceptor, or null if there is none.
GetDynamicVariables(String)
Get all the dynamic variables in the given module, and return them as a Tuple where the field names are the names of the dynamic variables, and the field values are the current values of the dynamic variables.
GetHashCode()()()()
Serves as a hash function for a particular type.
(Inherited from Object.)
GetSchemaByHash(array<Byte>[]()[][])
Return the Schema object for the given hash value
GetSchemaByName(String)
Get a schema by name. This will only succeed for named schemas; unnamed schemas assigned to a stream should instead be looked up by using the Schema for the given stream as returned by GetStreamProperties(String)
GetSchemaForStream(String)
Returns the schema of a stream, throwing an exception if the stream does not exist.
GetStreamProperties(String)
Returns a description of a stream, throwing an exception if the stream does not exist.
GetStreamPropertiesByHash(array<Byte>[]()[][])
Return the StreamProperties object for the given hash value
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
GetURI()()()()
Get the URI of the server to which we're connected.
GetURIs()()()()
Get the URIs of the servers to which we're connected.
GetVersion()()()()
Returns the client version as a string
IsClosed()()()()
Return true if the client connection is closed. The client connection can be closed by calling the Close() method, by a server shutdown, or a network error.
IsConnected()()()()
Returns true if the client has any active connections to StreamBase Servers.
IsStreamSubscribed(String)
ListEntities(EntityType)
Lists all entities of a particular type.
ListEntities(String, StreamBaseClient..::..ListEntitiesFlags)
Lists all entities of a particular type.

Use the given flags to list the entities.

ListEntities(EntityType, StreamBaseClient..::..ListEntitiesFlags)
Lists all entities of a particular type.

Use the given flags to list the entities.

ReadTable(String, Int32)
Return rows from a Query Table or Materialized Window. No guarantees are made regarding the order of rows returned.
ReadTable(String, Int32, String)
Return rows from a Query Table or Materialized Window, applying an optional predicate to decide which rows are returned. No guarantees are made regarding the order of rows returned.
Resubscribe(String, String, String)
Resubscribes to a stream with a predicate to apply to output tuples. The stream name of dequeued tuples is sLogicalStream. When unsubscribing, use sLogicalStream.
Resubscribe(StreamProperties, String, String)
Reubscribes to a stream with a predicate to apply to output tuples. The stream name of dequeued tuples is sLogicalStream. When unsubscribing, use sLogicalStream.
SetDequeueResultInterceptor(DequeueResult..::..Interceptor)
Set the dequeue results interceptor for this client connection.

This results interceptor replaces any existing results processor. To disable pre-processing of results, set the processor to null.

Note:
This method cannot be safely called while another thread is calling dequeue().
setDynamicVariable(String, String)
Deprecated: use the uppercase 'S' version
SetDynamicVariable(String, String)
Set the dynamic variable at the given path to the given value, expressed as a string in CSV style.
SetQuiescentLimit(Int32)
Sets how many milliseconds a dequeueing client will tolerate not receiving a client heart beat from the StreamBase server that it is connected to. The default value is 120000 (120 seconds). By default, StreamBase servers emit "client heart beats" every 10 seconds so StreamBase applications have no requirement to send data regularly.
Status()()()()
Return the status of the StreamBase Server
Status(Boolean)
Return the status of the StreamBase Server
Subscribe(String)
Subscribes to the named stream.
Subscribe(StreamProperties)
Subscribes to the given stream.
Subscribe(String, String, String)
Subscribes to a stream with a predicate to apply to output tuples. The stream name of dequeued tuples is sLogicalStream. When unsubscribing, use sLogicalStream.
Subscribe(StreamProperties, String, String)
Subscribes to a stream with a predicate to apply to output tuples. The stream name of dequeued tuples is sLogicalStream. When unsubscribing, use sLogicalStream.
ToString()()()()
Returns a string that represents the current object.
(Inherited from Object.)
Typecheck(String)
Typecheck (validate) the given StreamBase Application.
Typecheck(String, Boolean)
Typecheck (validate) the given StreamBase Application.
Unsubscribe(String)
Unsubscribes from the named stream.
Note:
Any tuples that are in-flight during an unsubscribe request will be dequeued until the stream is fully drained.
Unsubscribe(StreamProperties)
Unsubscribes from the given stream.
Note:
Any tuples that are in-flight during an unsubscribe request will be dequeued until the stream is fully drained.

Inheritance Hierarchy

System..::..Object
  StreamBase.SB.Client..::..StreamBaseClient

See Also