-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.txt
86 lines (67 loc) · 2.78 KB
/
TODO.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
- consider decorator style implementation for filtering on Channel interface
- first, the state must be considered
- then the chain can be called
- so the decorator must be based somehow on the state classes?
- exception handling on client classes (handlers)
- SessionHandler, ChannelHandler, and ReplyHandler
- allow handlers to throw any exception?
- catch exceptions and
- terminate session?
- delegate back to the handlers? e.g. ChannelHandler#exceptionCaught?
- Channel
- add state to channel?
- Channel#setAttribute(name,value)
- same for Session?
- logging
- add context: remote peer address, ...
- introduce thread pool to provide inter channel asynchrony
- receiving messages
- channel receives messages synchronously
- channel receives replies synchronously
while (true) {
waitForPromotion()
ChannelBuffer buf = fetchBuffer()
giveUpLead()
processEvents(buf)
follow()
}
- support Content-Transfer-Encoding: base64, (quoted-printable)
- GenericSessionHandler -> SessionHandler
- factory:ChannelHandlerFactory
- advertisedProfiles:String[]
- connectionEstablished registers profiles
- channelStartRequested selects first supported profile according to list
- maybe desired, wait for user feedback
- logging
- net.sf.beep4j.transport: logging of transport layer events
- net.sf.beep4j.transport.DATA: all data passing through the transport layer
- next tasks
- change internals to frame handling
- API changes
- support assembling messages in ChannelHandler or ChannelFilter
- support preemptive ERR replies (reply to incoming message)
- i.e. do not call ChannelHandler.messageReceived when premature ERR was created
- see also section 2.6.3 of the BEEP specification
- supporting receiving preemptive ERR replies seems not possible
- message will already be waiting for transport in the ChannelController
- there is no way to stop that (feedback from session to stream layer...)
- ReplyHandlerWrapper must be a bit more conservative about completing replies
- allow termination of Session (i.e. dropping TCP connection)
- filtering
- review ChannelFilter interface
- write LoggingChannelFilter, just for fun
- logging
- context (channel number, remote peer, ...)
- low-level BEEP logging
ChannelHandler
+receivedMSG(message:Object,reply:Reply)
ReplyHandler
+receivedRPY(message:Object)
+receivedERR(message:Object)
+receivedANS(message:Object)
+receivedNUL(message:Object)
- message is either a Frame, a Message, or an arbitrary application object
- create BeepFrameSequencingValidator
- replaces MessageAssembler
- validates the various BEEP sequencing constraints
- ChannelFilter / ChannelHandler / ReplyHandler can be sure that those constraints hold