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
ClientEndPoint
Implements
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.ReferenceEquals(System.Object, System.Object)
Assembly: Azos.dll
Syntax
public abstract class ClientEndPoint : EndPoint, IDisposable
Constructors
ClientEndPoint(IGlue, Node, Binding)
Declaration
public ClientEndPoint(IGlue glue, Node node, Binding binding = null)
Parameters
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 |
|
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 |
|
Returns headers that get attached in every call
Declaration
public Headers Headers { get; }
Property Value
MsgInspectors
Returns client message inspectors for this instance
Declaration
public OrderedRegistry<IClientMsgInspector> MsgInspectors { get; }
Property Value
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 careful 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
DispatchCall(RequestMsg)
Dispatches a call into binding passing message through client inspectors on this endpoint
Declaration
protected CallSlot DispatchCall(RequestMsg request)
Parameters
Returns
ForgetRemoteInstance()
Sets RemoteInstance to null. This method is needed when the same instance of client endpoint is used to make subsequent stateful 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()
ToString()
Declaration
public override string ToString()
Returns
Type |
Description |
System.String |
|
Overrides
System.Object.ToString()
Implements
System.IDisposable
Extension Methods