InspectorCore class
Properties
channels
→ List <String >
The channels anything has been said on or registered for.
no setter
detailsByteCap
→ int
Bytes of encoded details kept; the oldest evict first. Bounded in bytes
rather than entries because one body can outweigh a thousand headers.
final
hashCode
→ int
The hash code for this object.
no setter inherited
identity
→ Map <String , Object ? > Function()
What the meta/attach reply says about the inspected process, over and
above the channels and events this core adds. A server names itself,
its pid and its project root; an app will name something else. Called per
attach, so a transport that learns its facts late still reports them.
final
isStopped
→ bool
no setter
onEvent
→ void Function(String channel , Map <String , Object ? > payload ) ?
Every event, before it is ringed — the hook a transport reduces with.
final
ringSize
→ int
Kept events per channel; the oldest fall off first.
final
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
Methods
addEvent (String channel , Map <String , Object ? > payload , {String ? rid , Map <String , Object ? > ? details })
→ int
Rings one event and returns its id — the handle an item action is
invoked with, and the only way a reporter can tie a row back to whatever
it was reporting on. Zero when the core has stopped and nothing was
ringed.
attach (InspectorPeer peer , int requestId )
→ void
The handshake that makes connection ≠ attachment: nothing is written to a
peer that has not asked, so a probe that connects and closes is free.
debugClearEvents ()
→ void
Empties the ring and the held details, leaving handlers and attachments
alone.
detach (InspectorPeer peer )
→ void
Forgets peer and closes it. Idempotent, because both ends can decide a
peer is gone: the transport's read loop and a failed write.
detachAll ()
→ void
Drops every attachment. The transport keeps whatever else it owns — a
listening socket, a handle file — and decides separately what to do
with it.
handleFrame (InspectorPeer peer , Map <String , Object ? > frame )
→ void
Dispatches one decoded frame from peer. Anything that is not a
well-formed request is ignored, which is what makes a liveness knock —
connect, say nothing, close — cost a read loop and nothing else.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerHandler (String channel , String method , InspectorCommandHandler handler )
→ void
send (InspectorPeer peer , Map <String , Object ? > frame )
→ void
Sends one frame, dropping peer if it cannot take it.
stop ()
→ void
After this the core takes no more events and holds no peers. A transport
calls it from its own shutdown.
toString ()
→ String
A string representation of this object.
inherited
unregisterHandlers (String channel )
→ void
Forgets a channel's handlers — what a panel being torn down means.