Class StartupMessage (0.14.1)
Stay organized with collections
Save and categorize content based on your preferences.
publicclass StartupMessageextendsBootstrapMessageThe first (non-encryption, non-admin) message expected in from a client in a connection loop. Here we handle metadata and authentication if any.
Inherited Members
Static Fields
IDENTIFIER
publicstaticfinalintIDENTIFIERConstructors
StartupMessage(ConnectionHandler connection, int length)
publicStartupMessage(ConnectionHandlerconnection,intlength)Methods
getHeaderLength()
protectedintgetHeaderLength()How many bytes is taken by the payload header. Header is defined here as protocol definition + length. Most common value here is four bytes, so we keep that as default. Effectively, this is how much of the message you "don't" want to read from the message's total length with readAll.
getIdentifier()
protectedStringgetIdentifier()Used for logging.
getMessageName()
protectedStringgetMessageName()Used for logging.
getParameters()
publicMap<String,String>getParameters()getPayloadString()
protectedStringgetPayloadString()Used for logging.
nextHandler()
publicvoidnextHandler()Here we expect the nextHandler to be PasswordMessage if we authenticate.
sendPayload()
protectedvoidsendPayload()Override this method to include post-processing and metadata in the sending process. Template method for send.