NOISIF Platform
Toggle table of contents
80ccce4
java
Target filter
java
Switch theme
Search in API
Skip to content
NOISIF Platform
NSL Net
/
xyz.noisif.nsl.net.ws
/
GenericWsSessionAdapter
Generic
Ws
Session
Adapter
abstract
class
GenericWsSessionAdapter
:
NetworkSender
,
EncodedPayloadVisitor
,
EnvelopeSession
Members
Constructors
Generic
Ws
Session
Adapter
Link copied to clipboard
protected
constructor
(
principalId
:
String
,
messageCodec
:
UnifiedMessageCodec
)
Properties
log
Link copied to clipboard
protected
val
log
:
Logger
message
Codec
Link copied to clipboard
protected
val
messageCodec
:
UnifiedMessageCodec
principal
Id
Link copied to clipboard
protected
val
principalId
:
String
session
Id
Link copied to clipboard
protected
val
sessionId
:
String
UNKNOWN_
ENVELOPE
Link copied to clipboard
private
val
UNKNOWN_ENVELOPE
:
String
=
"UNKNOWN"
Functions
accept
Link copied to clipboard
fun
accept
(
payload
:
Array
<
Byte
>
)
fun
accept
(
payload
:
String
)
close
Link copied to clipboard
fun
close
(
closeCode
:
CloseCode
)
get
Principal
Id
Link copied to clipboard
fun
getPrincipalId
(
)
:
String
get
Session
Id
Link copied to clipboard
fun
getSessionId
(
)
:
String
is
Closed
Link copied to clipboard
abstract
fun
isClosed
(
)
:
Boolean
on
Close
Link copied to clipboard
protected
abstract
fun
onClose
(
code
:
Int
,
reason
:
String
)
on
Send
Link copied to clipboard
protected
abstract
fun
onSend
(
message
:
Array
<
Byte
>
)
protected
abstract
fun
onSend
(
message
:
String
)
send
Link copied to clipboard
fun
send
(
message
:
Array
<
Byte
>
)
fun
send
(
message
:
String
)
send
Envelope
Link copied to clipboard
open
fun
sendEnvelope
(
opCode
:
OpCode
)
fun
sendEnvelope
(
opCode
:
OpCode
,
data
:
Any
)
send
Safely
Link copied to clipboard
private
open
fun
sendSafely
(
logAction
:
Runnable
,
transportAction
:
RunnableWithException
)
unwrap
Link copied to clipboard
fun
unwrap
(
payload
:
Array
<
Byte
>
,
typeResolver
:
(
Integer
)
->
Class
<
out
Any
>
)
:
MessageEnvelope
<
out
Any
>
fun
unwrap
(
payload
:
String
,
typeResolver
:
(
Integer
)
->
Class
<
out
Any
>
)
:
MessageEnvelope
<
out
Any
>