Show / Hide Table of Contents

Class ClientEndPoint

Represents an ancestor for client classes that make calls to server endpoints. This and descendant classes are thread safe ONLY for making non-constructing/destructing remote calls, unless ReserveTransport is set to true in which case no operation is thread safe

Inheritance
System.Object
DisposableObject
EndPoint
ClientEndPoint
TelemetryReceiverClient
GlueForm.BadContract
Implements
System.IDisposable
Inherited Members
EndPoint.m_Glue
EndPoint.m_Node
EndPoint.m_Binding
EndPoint.Glue
EndPoint.Node
EndPoint.Binding
DisposableObject.DisposeAndNull<T>(T)
DisposableObject.DisposeStarted
DisposableObject.Disposed
DisposableObject.EnsureObjectNotDisposed()
DisposableObject.Dispose()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: NFX.Glue
Assembly: NFX.dll
Syntax
public abstract class ClientEndPoint : EndPoint, IDisposable
Remarks

This class is not thread safe in general, however Glue allows for concurrent remote calls via the same endpoint instance if the following conditions are met: 1). The endpoint instance has not reserved its transport (ReserveTransport=false) 2). Either remote contract is stateless OR none of the concurrent calls are constructing/destructing remote instance The second condition ensures that stateful remote instance is consistent, otherwise operations may get executed out-of-order in the multithreaded scenario

Constructors

ClientEndPoint(IGlue, Node, Binding)

Declaration
public ClientEndPoint(IGlue glue, Node node, Binding binding = null)
Parameters
Type Name Description
IGlue glue
Node node
Binding binding

ClientEndPoint(IGlue, String, Binding)

Declaration
public ClientEndPoint(IGlue glue, string node, Binding binding = null)
Parameters
Type Name Description
IGlue glue
System.String node
Binding binding

ClientEndPoint(Node, Binding)

Declaration
public ClientEndPoint(Node node, Binding binding = null)
Parameters
Type Name Description
Node node
Binding binding

ClientEndPoint(String, Binding)

Declaration
public ClientEndPoint(string node, Binding binding = null)
Parameters
Type Name Description
System.String node
Binding binding

Properties

Contract

Returns a contract type of this endpoint. "C" component of the "ABC" rule

Declaration
public abstract Type Contract { get; }
Property Value
Type Description
System.Type

DispatchTimeoutMs

Specifies timeout for call invocation

Declaration
public int DispatchTimeoutMs { get; set; }
Property Value
Type Description
System.Int32

Headers

Returns headers that get attached in every call

Declaration
public Headers Headers { get; }
Property Value
Type Description
Headers

MsgInspectors

Returns client message inspectors for this instance

Declaration
public OrderedRegistry<IClientMsgInspector> MsgInspectors { get; }
Property Value
Type Description
OrderedRegistry<IClientMsgInspector>

RemoteInstance

Returns a reference to remote instance or null if service is stateless(no instance created)

Declaration
public Guid? RemoteInstance { get; }
Property Value
Type Description
System.Nullable<System.Guid>

ReserveTransport

Indicates whether transport instance should not be released after a call and be reserved per this endpoint instance. Be carefull when setting this property to true as this action can really impede the system performance as transport is reserved until this property is either reset to false or endpoint instance is disposed. Transport reservation reduces call latency and is mostly beneficial in synchronous bindings. Warning: client endpoint with reserved transport is NOT THREAD SAFE for making parallel calls! Set this property to true only when latency is very critical and only 1 dedicated thread is working with this client endpoint instance

Declaration
public bool ReserveTransport { get; set; }
Property Value
Type Description
System.Boolean

TimeoutMs

Specifies timeout for the whole call

Declaration
public int TimeoutMs { get; set; }
Property Value
Type Description
System.Int32

Methods

__setRemoteInstance(Guid)

Declaration
protected void __setRemoteInstance(Guid id)
Parameters
Type Name Description
System.Guid id

Destructor()

Declaration
protected override void Destructor()
Overrides
DisposableObject.Destructor()

DispatchCall(RequestMsg)

Dispatches a call into binding passing message through client inspectors on this endpoint

Declaration
protected CallSlot DispatchCall(RequestMsg request)
Parameters
Type Name Description
RequestMsg request
Returns
Type Description
CallSlot

ForgetRemoteInstance()

Sets RemoteInstance to null. This method is needed when the same instance of client endpoint is used to make subsequent statefull calls to different server instances. Call this method before calling [Constructor]-decorated remote method or making the first call to InstanceLifetime.AutoconstructedStateful servers.

Declaration
public void ForgetRemoteInstance()
Remarks

The remote instance ID is retained locally even after a call to [Destructor]-decorated remote method. This is needed because a call to destructor may be asynchronous and it may be necessary to know the ID of the instance (that has already died on remote host) after call returns. Call ForgetRemoteInstance() to deterministically nullify the local cached ID.

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.Object.ToString()

Implements

System.IDisposable

Extension Methods

MiscUtils.NonNull<T>(T, Func<Exception>, String)
ObjectValueConversion.AsString(Object, String, ConvertErrorHandling)
ObjectValueConversion.AsNonNullOrEmptyString(Object)
ObjectValueConversion.AsLaconicConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsJSONConfig(Object, ConfigSectionNode, String, ConvertErrorHandling)
ObjectValueConversion.AsXMLConfig(Object, ConfigSectionNode, ConvertErrorHandling)
ObjectValueConversion.AsChar(Object, Char, ConvertErrorHandling)
ObjectValueConversion.AsNullableChar(Object, Nullable<Char>, ConvertErrorHandling)
ObjectValueConversion.AsByte(Object, Byte, ConvertErrorHandling)
ObjectValueConversion.AsNullableByte(Object, Nullable<Byte>, ConvertErrorHandling)
ObjectValueConversion.AsSByte(Object, SByte, ConvertErrorHandling)
ObjectValueConversion.AsNullableSByte(Object, Nullable<SByte>, ConvertErrorHandling)
ObjectValueConversion.AsShort(Object, Int16, ConvertErrorHandling)
ObjectValueConversion.AsNullableShort(Object, Nullable<Int16>, ConvertErrorHandling)
ObjectValueConversion.AsUShort(Object, UInt16, ConvertErrorHandling)
ObjectValueConversion.AsNullableUShort(Object, Nullable<UInt16>, ConvertErrorHandling)
ObjectValueConversion.AsInt(Object, Int32, ConvertErrorHandling)
ObjectValueConversion.AsNullableInt(Object, Nullable<Int32>, ConvertErrorHandling)
ObjectValueConversion.AsUInt(Object, UInt32, ConvertErrorHandling)
ObjectValueConversion.AsNullableUInt(Object, Nullable<UInt32>, ConvertErrorHandling)
ObjectValueConversion.AsLong(Object, Int64, ConvertErrorHandling)
ObjectValueConversion.AsNullableLong(Object, Nullable<Int64>, ConvertErrorHandling)
ObjectValueConversion.AsULong(Object, UInt64, ConvertErrorHandling)
ObjectValueConversion.AsNullableULong(Object, Nullable<UInt64>, ConvertErrorHandling)
ObjectValueConversion.AsDouble(Object, Double, ConvertErrorHandling)
ObjectValueConversion.AsNullableDouble(Object, Nullable<Double>, ConvertErrorHandling)
ObjectValueConversion.AsFloat(Object, Single, ConvertErrorHandling)
ObjectValueConversion.AsNullableFloat(Object, Nullable<Single>, ConvertErrorHandling)
ObjectValueConversion.AsDecimal(Object, Decimal, ConvertErrorHandling)
ObjectValueConversion.AsNullableDecimal(Object, Nullable<Decimal>, ConvertErrorHandling)
ObjectValueConversion.AsBool(Object, Boolean, ConvertErrorHandling)
ObjectValueConversion.AsNullableBool(Object, Nullable<Boolean>, ConvertErrorHandling)
ObjectValueConversion.AsGUID(Object, Guid, ConvertErrorHandling)
ObjectValueConversion.AsNullableGUID(Object, Nullable<Guid>, ConvertErrorHandling)
ObjectValueConversion.AsDateTime(Object)
ObjectValueConversion.AsDateTime(Object, DateTime, ConvertErrorHandling)
ObjectValueConversion.AsNullableDateTime(Object, Nullable<DateTime>, ConvertErrorHandling)
ObjectValueConversion.AsGDID(Object)
ObjectValueConversion.AsGDID(Object, GDID, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDID(Object, Nullable<GDID>, ConvertErrorHandling)
ObjectValueConversion.AsGDIDSymbol(Object)
ObjectValueConversion.AsGDIDSymbol(Object, GDIDSymbol, ConvertErrorHandling)
ObjectValueConversion.AsNullableGDIDSymbol(Object, Nullable<GDIDSymbol>, ConvertErrorHandling)
ObjectValueConversion.AsTimeSpan(Object)
ObjectValueConversion.AsTimeSpan(Object, TimeSpan, ConvertErrorHandling)
ObjectValueConversion.AsNullableTimeSpan(Object, Nullable<TimeSpan>, ConvertErrorHandling)
ObjectValueConversion.AsEnum<TEnum>(Object, TEnum, ConvertErrorHandling)
ObjectValueConversion.AsNullableEnum<TEnum>(Object, Nullable<TEnum>, ConvertErrorHandling)
ObjectValueConversion.AsUri(Object, Uri, ConvertErrorHandling)
JSONExtensions.ToJSON(Object, JSONWritingOptions)
JSONExtensions.ToJSON(Object, TextWriter, JSONWritingOptions)
JSONExtensions.ToJSON(Object, Stream, JSONWritingOptions, Encoding)
ErlObject.ToErlObject(Object)
ErlObject.ToErlObject(Object, ErlTypeOrder, Boolean)
Back to top Copyright © 2006-2018 Agnicore Inc
Generated by DocFX