Class GremlinClient
Provides a mechanism for submitting Gremlin requests to one Gremlin Server.
Inheritance
Inherited Members
Namespace: Gremlin.Net.Driver
Assembly: cs.temp.dll.dll
Syntax
public class GremlinClient : IGremlinClient, IDisposable
Constructors
GremlinClient(GremlinServer, GraphSONReader, GraphSONWriter, String, ConnectionPoolSettings, Action<ClientWebSocketOptions>, String)
Initializes a new instance of the GremlinClient class for the specified Gremlin Server.
Declaration
public GremlinClient(GremlinServer gremlinServer, GraphSONReader graphSONReader = null, GraphSONWriter graphSONWriter = null, string mimeType = null, ConnectionPoolSettings connectionPoolSettings = null, Action<ClientWebSocketOptions> webSocketConfiguration = null, string sessionId = null)
Parameters
Type | Name | Description |
---|---|---|
GremlinServer | gremlinServer | The GremlinServer the requests should be sent to. |
GraphSONReader | graphSONReader | A |
GraphSONWriter | graphSONWriter | a |
System.String | mimeType | The GraphSON version mime type, defaults to latest supported by the server. |
ConnectionPoolSettings | connectionPoolSettings | The ConnectionPoolSettings for the connection pool. |
System.Action<ClientWebSocketOptions> | webSocketConfiguration | A delegate that will be invoked with the |
System.String | sessionId | The session Id if Gremlin Client in session mode, defaults to null as session-less Client. |
Fields
DefaultMimeType
Defines the default mime type to use.
Declaration
public const string DefaultMimeType = "application/vnd.gremlin-v3.0+json"
Field Value
Type | Description |
---|---|
System.String |
GraphSON2MimeType
The GraphSON2 mime type to use.
Declaration
public const string GraphSON2MimeType = "application/vnd.gremlin-v2.0+json"
Field Value
Type | Description |
---|---|
System.String |
Properties
NrConnections
Gets the number of open connections.
Declaration
public int NrConnections { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Dispose()
Declaration
public void Dispose()
Dispose(Boolean)
Releases the resources used by the GremlinClient instance.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Specifies whether managed resources should be released. |
SubmitAsync<T>(RequestMessage)
Submits a request message as an asynchronous operation.
Declaration
public async Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage)
Parameters
Type | Name | Description |
---|---|---|
RequestMessage | requestMessage | The |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ResultSet<T>> | A ResultSet<T> containing the data and status attributes returned from the server. |
Type Parameters
Name | Description |
---|---|
T | The type of the expected results. |
Exceptions
Type | Condition |
---|---|
ResponseException | Thrown when a response is received from Gremlin Server that indicates that an error occurred. |