Show / Hide Table of Contents

    Class GremlinClient

    Provides a mechanism for submitting Gremlin requests to one Gremlin Server.

    Inheritance
    System.Object
    GremlinClient
    Implements
    IGremlinClient
    System.IDisposable
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Gremlin.Net.Driver
    Assembly: cs.temp.dll.dll
    Syntax
    public class GremlinClient : IGremlinClient, IDisposable

    Constructors

    GremlinClient(GremlinServer, GraphSONReader, GraphSONWriter, String, ConnectionPoolSettings, Action<ClientWebSocketOptions>)

    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)
    Parameters
    Type Name Description
    GremlinServer gremlinServer

    The GremlinServer the requests should be sent to.

    GraphSONReader graphSONReader

    A instance to read received GraphSON data.

    GraphSONWriter graphSONWriter

    a instance to write GraphSON data.

    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 object used to configure WebSocket connections.

    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 Task<ResultSet<T>> SubmitAsync<T>(RequestMessage requestMessage)
    Parameters
    Type Name Description
    RequestMessage requestMessage

    The to send.

    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.

    Implements

    IGremlinClient
    System.IDisposable
    Back to top Copyright © 2018 The Apache Software Foundation