kronos-endpoint v2.15.0
kronos-endpoint
Named communication (end)-points inside of kronos

API
Table of Contents
Endpoint
Parameters
namestring endpoint nameownerObject of the endpoint (service or step)optionsObject (optional, default{})
isDefault
Indicate whatever we are a default endpoint. Default means buildin.
Returns boolean false
isIn
Returns boolean false
isOut
Returns boolean false
isOpen
Returns boolean false
isConnected
Returns boolean false
direction
Deliver data flow direction
Returns string delivers data flow direction 'in', 'out' or undefined
opposite
Deliver the opposite endpoint
Returns Endpoint representing the opposite direction
InterceptedEndpoint
Extends Endpoint
Endpoint with a list of interceptors also provides fistInterceptor and lastInterceptor
hasInterceptors
Returns boolean true if there is at least one interceptor assigned
interceptors
Deliver array of all assigned interceptors
Returns Array<Interceptor> the interceptors or empty array if none are present
interceptors
Set the interceptors a connected chain from array element 0 over all entries up to the last element in the array is formed. Additionally firstInterceptor and lastInterceptor are set.
Parameters
newInterceptorsArray<Interceptor> replaces all interceptors
ReceiveEndpoint
Extends InterceptedEndpoint
Receiving Endpoint by default a dummy rejecting receiver is assigned
Parameters
connected
Connect other side to us
Parameters
otherEndpoint endpoint to be connected to
sender
Deliver the sending side Endpoint
Returns SendEndpoint the sending side
receive
get the recive function
Returns Function
receive
Set the recive function If we know the sender we will inform him about our open/close state by calling willBeClosed() and hasBeenOpened()
Parameters
receiveFunction (optional, defaultrejectingReceiver)
isOpen
Are we able to receive requests
Returns boolean true if we are able to receive requests
isIn
We are always in
Returns boolean always true
ReceiveEndpointDefault
Extends ReceiveEndpoint
Receive Endpoint acting as a default endpoints
isDefault
We are a default endpoint
Returns boolean always true
SendEndpoint
Extends ConnectorMixin(InterceptedEndpoint)
Sending Endpoint
Parameters
namestring endpoint nameownerObject of the endpoint (service or step)optionsObject (optional, default{})options.oppositeEndpoint? endpoint going into the opposite directionoptions.hasBeenConnectedFunction? called after connectedoptions.hasBeenDisconectedFunction? called after disconnectedoptions.hasBeenOpenedFunction? called after receiver is openoptions.willBeClosedFunction? called before receiver is closed
isOut
We are always out
Returns boolean always true
SendEndpointDefault
Extends SendEndpoint
Send Endpoint acting as a default endpoints
isDefault
We are a default endpoint
Returns boolean always true
install
With npm do:
npm install kronos-endpointlicense
BSD-2-Clause
7 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
