com.neeve.link
Interface ILnkEndpoint

All Known Subinterfaces:
ILnkClientEndpoint, ILnkPeerEndpoint, ILnkServerEndpoint
All Known Implementing Classes:
LnkClientEndpoint, LnkPeerEndpoint, LnkServerEndpoint

public interface ILnkEndpoint

Base interface for the client, server and peer endpoint interfaces.

This class serves as the base interface for the client, server and peer endpoint interfaces.

Threading:
Refer to the threading model of the type specific endpoint.

Field Summary
static int IOFLAG_FLUSH_FORCE
          I/O flag - Force a flush.
static int IOFLAG_FLUSH_SUPPRESS
          I/O flag - Suppress automatic flush.
static int IOFLAG_IMMEDIATE_DISPATCH
          I/O flag - Instruct a link endpoint to dispatch the IO completion event synchronously (if possible).
static int IOFLAG_NO_ASYNC
          I/O flag - Prohibit a link endpoint from scheduling an operation for asynchronous completion..
static int LVFLAG_ALLOW_FLUSH_PENDING
          Leave flag - Allow leave with flush pending async completion.
static int LVFLAG_SUPPRESS_IMPLICT_CLOSE
          Leave flag - Do not perform an implicit close on leave.
 

Field Detail

IOFLAG_IMMEDIATE_DISPATCH

static final int IOFLAG_IMMEDIATE_DISPATCH
I/O flag - Instruct a link endpoint to dispatch the IO completion event synchronously (if possible).

By default, all post operation methods that notify the result of the operation through the use of a completion event return before the completion event is dispatched even if the operation completed successfully before method returned. This flag overrides that behavior and indicates that, in case the operation completes before the method returns, the method should dispatch the completion event prior to returning.

See Also:
Constant Field Values

IOFLAG_NO_ASYNC

static final int IOFLAG_NO_ASYNC
I/O flag - Prohibit a link endpoint from scheduling an operation for asynchronous completion..

By default, any post operation first attempts to complete the operation synchronously i.e. before the post method invocation returns. In case the operation could not be completed before returning, the endpoint schedules the operation for completion in the background i.e. asynchronously driven by the dispatcher provided at the time the operation was initiated). This flag modifies that behaviour in that it prohibits the operation from being scheduled for completion in the background. With this flag set, in case the operation does not complete synchronously, the operation method will throw an ELnkOpWouldAsyncException.

See Also:
Constant Field Values

IOFLAG_FLUSH_SUPPRESS

static final int IOFLAG_FLUSH_SUPPRESS
I/O flag - Suppress automatic flush.

This flag forces an ILnkPeerEndpoint.enque(short, com.neeve.pkt.PktPacket, com.neeve.link.ILnkPeerEndpoint.FlushContext, int) operation to never automatically flush the endpoint (even if it has internal policies that are set to make it do so). This flag takes precedence over IOFLAG_FLUSH_FORCE

See Also:
Constant Field Values

IOFLAG_FLUSH_FORCE

static final int IOFLAG_FLUSH_FORCE
I/O flag - Force a flush.

This flag forces an ILnkPeerEndpoint.enque(short, com.neeve.pkt.PktPacket, com.neeve.link.ILnkPeerEndpoint.FlushContext, int) operation to always flush the endpoint after enqueing the packet.

See Also:
Constant Field Values

LVFLAG_ALLOW_FLUSH_PENDING

static final int LVFLAG_ALLOW_FLUSH_PENDING
Leave flag - Allow leave with flush pending async completion.

A specification of this flag to ILnkPeerEndpoint.leave(short, int) will allow the user to leave an endpoint with a flush pending asynchronous completion. In such a case, in case the leave results in a close, the leave method will defer the close till the flush has completed. The user needs to continue to drive the dispatcher associated with the flush. Since the user has left the endpoint, no flush completion event will be dispatched to the user. However, the user can monitor the status of the flush from the flush context associated with the flush.

See Also:
Constant Field Values

LVFLAG_SUPPRESS_IMPLICT_CLOSE

static final int LVFLAG_SUPPRESS_IMPLICT_CLOSE
Leave flag - Do not perform an implicit close on leave.

A specification of this flag to ILnkPeerEndpoint.leave(short, int) will suppress the implicit close called by the leave method in case the leave results in no more users attached to the endpoint. In this case the user can either initiate the close of the endpoint via an explicit call to ILnkPeerEndpoint.close(short) or join and leave the endpoint with this flag unset

See Also:
Constant Field Values


Copyright © 2015 Neeve Research, LLC. All Rights Reserved.