Class ControlMessage (0.16.0)

publicabstractclass ControlMessageextendsWireMessage

Generic representation for a control wire message: that is, a message which does not handle any form of start-up, but reather general communications.

Inheritance

java.lang.Object > WireMessage > ControlMessage

Static Methods

create(ConnectionHandler connection)

publicstaticControlMessagecreate(ConnectionHandlerconnection)

Factory method to create the message from the specific command type char.

Parameter
Name Description
connection ConnectionHandler

The connection handler object setup with the ability to send/receive.

Returns
Type Description
ControlMessage

The constructed wire message given the input message.

Exceptions
Type Description
Exception

If construction or reading fails.

getFormatCodes(DataInputStream input)

protectedstaticList<Short>getFormatCodes(DataInputStreaminput)

Extract format codes from message (useful for both input and output format codes).

Parameter
Name Description
input DataInputStream

The data stream containing the user request.

Returns
Type Description
List<Short>

A list of format codes.

Exceptions
Type Description
Exception

If reading fails in any way.

Constructors

ControlMessage(ConnectionHandler connection)

publicControlMessage(ConnectionHandlerconnection)
Parameter
Name Description
connection ConnectionHandler

ControlMessage(ConnectionHandler connection, int length, ControlMessage.ManuallyCreatedToken token)

protectedControlMessage(ConnectionHandlerconnection,intlength,ControlMessage.ManuallyCreatedTokentoken)

Constructor for manually created Control messages.

Parameters
Name Description
connection ConnectionHandler
length int

Methods

handleError(Exception exception)

protectedvoidhandleError(Exceptionexception)

Takes an Exception Object and relates its results to the user within the client.

Parameter
Name Description
exception Exception

The exception to be related.

Exceptions
Type Description
Exception

if there is some issue in the sending of the error messages.

isExtendedProtocol()

publicbooleanisExtendedProtocol()
Returns
Type Description

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.