Home › Packages › softlisten

Package softlisten

This package contains 3 source unit(s) defining 6 class(es) / struct(s). Each unit below lists its fields (the values it stores) and methods (the actions it performs), with a plain explanation of each.

SLSoftOffer #sleela 3.0 (lib/softlisten/SLSoftOffer.sleela)

SLSoftOffer class

Defines SLSoftOffer — a contribution someone has OFFERED to the standing system but that the consuming model has not agreed to yet. An offer is plain data: who offered it, at what trust, what it would do (a document edit, a module, a vertical-integration tier), the tokens it carries, the ties it claims to other things, and the findings the soft listeners have attached. It changes nothing until it is agreed.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
idint idNo description in source.
offererString offererNo description in source.
trustint trustNo description in source.
kindint kindNo description in source.
stateint stateNo description in source.
lineint linedocument offers
textString textNo description in source.
expectOldString expectOldwhat the offerer saw on that line (replace and delete), for conflict checks
typeIdString typeIdmodule and tier offers
instNameString instNameNo description in source.
digestString digestNo description in source.
kindOrdint kindOrdNo description in source.
portSLObserverPort portNo description in source.
tokensString[] tokenstokens (the host splits the text) and claimed ties
tokenCountint tokenCountNo description in source.
tokensClippedint tokensClippedNo description in source.
tiesString[] tiesNo description in source.
tieCountint tieCountNo description in source.
tiesClippedint tiesClippedNo description in source.
fListenerString[] fListenerfindings attached by soft listeners
fSeverityint[] fSeverityNo description in source.
fCodeString[] fCodeNo description in source.
fDetailString[] fDetailNo description in source.
fCountint fCountNo description in source.
fLostint fLostNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
configurevoid configure(int offerId, String who, int trustLevel, int what)No description in source.
getIdint getId()No description in source.
getOffererString getOfferer()No description in source.
getTrustint getTrust()No description in source.
getKindint getKind()No description in source.
getStateint getState()No description in source.
setStatevoid setState(int s)No description in source.
isOpenboolean isOpen()No description in source.
isDocumentOfferboolean isDocumentOffer()No description in source.
aimAtLinevoid aimAtLine(int atLine, String newText, String seenOld)No description in source.
aimAtModulevoid aimAtModule(String type, String name, String digestPresented, SLObserverPort p)No description in source.
aimAtTiervoid aimAtTier(String name, String label, int kindOrdinal)No description in source.
getLineint getLine()No description in source.
getTextString getText()No description in source.
getExpectOldString getExpectOld()No description in source.
getTypeIdString getTypeId()No description in source.
getInstNameString getInstName()No description in source.
getDigestString getDigest()No description in source.
getKindOrdint getKindOrd()No description in source.
getPortSLObserverPort getPort()No description in source.
addTokenvoid addToken(String t)Up to 8 tokens and 8 ties are kept; more are counted as clipped.
addTievoid addTie(String t)No description in source.
tokenTotalint tokenTotal()No description in source.
tokenAtString tokenAt(int i)No description in source.
clippedTokensint clippedTokens()No description in source.
tieTotalint tieTotal()No description in source.
tieAtString tieAt(int i)No description in source.
clippedTiesint clippedTies()No description in source.
clearFindingsvoid clearFindings()No description in source.
addFindingvoid addFinding(String listener, int severity, String code, String detail)No description in source.
findingTotalint findingTotal()No description in source.
findingsLostint findingsLost()No description in source.
findingListenerString findingListener(int i)No description in source.
findingSeverityint findingSeverity(int i)No description in source.
findingCodeString findingCode(int i)No description in source.
findingDetailString findingDetail(int i)No description in source.
worstint worst()The worst severity found, or -1 with no findings. A lost finding counts as a block: if the record overflowed, the offer is not trusted.
hasCodeboolean hasCode(String code)No description in source.
countAtint countAt(int severity)No description in source.

SLSoftOfferDesk #sleela 3.0 (lib/softlisten/SLSoftOfferDesk.sleela)

SLSoftOfferDesk class

Defines SLSoftOfferDesk — where soft offers wait. People offer

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Malice class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
stateint stateNo description in source.
levelint levelNo description in source.
issuedint issuedNo description in source.
denyTokensString[] denyTokensNo description in source.
tokenTotalint tokenTotalNo description in source.
denyLinesString[] denyLinesNo description in source.
lineTotalint lineTotalNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
attachvoid attach()No description in source.
addTokenboolean addToken(String t)No description in source.
addLineboolean addLine(String t)No description in source.
denyTotalint denyTotal()No description in source.
sevint sev(int base)No description in source.
assessint assess(SLSoftOffer o, SLSoftOffer[] all, int count)No description in source.

Ties class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
stateint stateNo description in source.
levelint levelNo description in source.
issuedint issuedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
attachvoid attach()No description in source.
sevint sev(int base)No description in source.
anchoredboolean anchored(String t, String[] anchors, int anchorCount)No description in source.
assessint assess(SLSoftOffer o, SLHotLinker linker, String[] anchors, int anchorCount)No description in source.

Loader class

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
nameString nameNo description in source.
stateint stateNo description in source.
levelint levelNo description in source.
issuedint issuedNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
attachvoid attach()No description in source.
sevint sev(int base)No description in source.
assessint assess(SLSoftOffer o, SLHotLinker linker, SLHotLinkIntegration vi)No description in source.

softlisten-demo #sleela 3.0 (lib/softlisten/softlisten-demo.sleela)

SoftListenDemo class

Runnable, self-checking demonstrator for soft offers and soft listeners. Offers wait at a desk, unagreed, while the Malice, Ties and Loader listeners ascertain them: deny-listed lines and tokens, false and dead and undeclared ties, loader issues from a dry run of the hot-link linker, and conflicts with the live document. Shows HOLD findings that clear when the world changes, BLOCK findings that never do, the consuming model agreeing through the observer and the linker, and the soft listeners themselves being paused, altered and retired (failing closed). Prints PASS or FAIL per check and a tally.

Carries the standard Metadata Class record — eleven catalogued provenance attributes (version, id, author, date, copyright, trademark, corporation, origin, birth date, science rating, national schedule) with matching get/set accessors. These are omitted from the tables below for brevity.

Fields — the named values this unit stores.

FieldDeclarationWhat it holds
passedint passedNo description in source.
failedint failedNo description in source.
docSLObserverDocument docNo description in source.
obsSLDocumentObserver obsNo description in source.
linkerSLHotLinker linkerNo description in source.
viSLHotLinkIntegration viNo description in source.
deskSLSoftOfferDesk deskNo description in source.

Methods — the actions this unit can perform.

MethodSignatureWhat it does
checkvoid check(String label, boolean ok)No description in source.
bannervoid banner(String t)No description in source.
settlevoid settle()Host cycle: deliver, let the desk listen, route.
worstOfint worstOf(int id)No description in source.
hasboolean has(int id, String code)No description in source.
stateOfint stateOf(int id)No description in source.
lineOfferint lineOffer(String who, int trust, int kind, int line, String text, String seenOld, String token)A one-token document offer. kind: 0 insert, 1 replace, 2 delete.
mainvoid main()No description in source.