BinMessage Class (.NET)

This is a Library topic for RemObjects SDK for .NET
This page is generated from external data, please do not update
Namespaces — Interfaces — Classes — Enums — Implements
Contents |
Overview
The BinMessage component implements a Message type that can be used to encode messages in a proprietary binary format to send between client and server. Though the format used is proprietary, it is highly efficient and small. For a slower, but an open-standard protocol, use SOAP Message.
The BinMessage format is compatible with the BinMessage component used by the RemObjects SDK for Delphi.
Location
- Assembly: RemObjects.SDK.dll
- Namespace: RemObjects.SDK
- Ancestry: System.ComponentModel.Component | Message | BinMessage
Properties
| AddServerExceptionPrefix (declared in Message) |
|---|
|
|
| ClientID (declared in Message) |
|
Contains the Client ID for the message. Client IDs are used by the RemObjects SDK for Session Management and to uniquely identify individual client on the server, for example by the Per-Client Class Factory or in your own custom code. Generally, you will not need to assign or read this value; the framework will automatically create a new unique client ID whenever a message object is instantiated on the client. However, you do have the option to read and write the ClientID property manually, for example to persist a specific client ID between shutdown and restart of your application.
|
| ContentType |
|
Overriden readonly property, which specifies message's content type. For BinMessage this is "application/octet-stream".
|
| DefaultDispatcherName |
|
This property will return the default/recommended dispatcher name for the message type. For BinMessage, this will always be the string constant "bin".
|
| EnforceMaxMessageSize |
|
Toggles whether the MaxMessageSize and MaxDecompressedMessageSize values will be enforced for incoming messages (true) or not (false). The recommendation is to have this enabled for servers and for clients that will talk to potentially non-trusted server applications.
|
| Envelopes (declared in Message) |
|
|
| InterfaceName (declared in Message) |
|
Contains the name of the interface (i.e. the service) that is being called (read-only).
|
| IsValidMessage (declared in Message) |
|
|
| MaxDecompressedMessageSize |
|
Controls the maximum message size to be received. The message class will reject messages that, when extracted, are larger then the configured value. This is to avoid malicious users overloading the server by sending spoofed ZLib packets that are small but expand to large blocks.
|
| MaxMessageSize |
|
Controls the maximum message size to be received. This serves as a security measure to prevent denial-of-service attacks, as it prevents attackers from bringing down your application by sending huge messages.
|
| MessageName (declared in Message) |
|
Contains the name of the message (i.e. the method) that is being called (read-only).
|
| MessageType (declared in Message) |
|
Contains the Type of message represented by the message instance.
|
| MessageVersion |
|
Contains the version number of the last message received. The currently supported message version is 107; future builds of the RemObjects SDK might contain extended support for newer message versions, if changes to the message format are introduced.
|
| MinSizeForCompression |
|
Minimum size for a message before compression is applied (default is 4096 bytes). Messages below this threshold are sent uncompressed, as the overhead of compressing and decompressing the data would likely outweigh the gain of having only slightly smaller packet on the network.
|
| SerializerInstance (declared in Message) |
|
This is the Serializer used to write values to the message. Descendant classes will set this property to a custom Serializer class within their InitializeMessage or ReadFromStream methods, so that future calls to the Read* and Write* methods can access the custom Serializer.
|
| ServerExceptionPrefix (declared in Message) |
|
|
| UseCompression |
|
Determines whether Compression will be used for outgoing messages. The message will be able to handle compressed and uncompressed incoming messages, regardless of this setting. Check the BinHeader's Compressed property to determine if compression was used on an incoming message.
|
Class Methods
| HasEnvelope (declared in Message) |
|---|
|
|
| MessageMatchingTargetUri (declared in Message) |
|
|
| MessageMatchingTargetUrl (declared in Message) |
|
|
Instance Methods
| constructor |
|---|
|
Default constructor
|
| CheckForEnvelope protected (declared in Message) |
|
|
| Clear |
|
Clears all internal data structures and prepare the BinMessage class to handle the processing of a new message.
|
| ClearAttributes (declared in Message) |
|
|
| Clone |
|
Creates and returns an identical copy of the message aMessage.
|
| CloneFrom protected |
|
Creates identical copy of the message aMessage and assignes it to the current BinMessage instance.
|
| CreateException protected (declared in Message) |
|
|
| DoReadFromStream protected |
|
Reads message from stream iStream and assignes it to the current BinMessage instance
|
| DoWriteToStream protected |
|
Writes current message to stream iStream
|
| FinalizeMessage (declared in Message) |
|
This method should be implemented to ensure that the message content is complete before sending it by doing any final processing necessary. FinalizeMessage is called after all Parameters have been written to a Message and before the message will be sent. It should perform any necessary wrap-up to ensure that a subsequent call to WriteToStream() will produce a complete message.
|
| FinalizeRequest (declared in Message) |
|
|
| GetStream (declared in Message) |
|
Creates a new stream with the content of the message.
|
| InitializeEventMessage (IChannel, String, String) |
|
Initializes new event message for interface aInterfaceName with message name aMessageName on channel aChannel.
|
| InitializeEventMessage (IChannel, String, String, String) (declared in Message) |
|
|
| InitializeExceptionMessage (IChannel, String, String, Exception) |
|
Initializes new exception message for interface aInterfaceName with message name aMessageName on channel aChannel.
|
| InitializeExceptionMessage (IChannel, String, String, String, Exception) (declared in Message) |
|
|
| InitializeMessage (IChannel, String, String, MessageType) |
|
Initializes custom message of type MessageType for interface aInterfaceName with message name aMessageName on channel aChannel.
|
| InitializeMessage (IChannel, String, String, String, MessageType) (declared in Message) |
|
|
| InitializeMessageEx |
|
Initializes empty custom message.
|
| InitializeRead (declared in Message) |
|
|
| InitializeRequest (declared in Message) |
|
|
| InitializeRequestMessage (IChannel, String, String) (declared in Message) |
|
Should be implemented by Message components to initialize a Request message.
|
| InitializeRequestMessage (IChannel, String, String, String) (declared in Message) |
|
|
| InitializeResponseMessage (IChannel, String, String) (declared in Message) |
|
Should be implemented by Message components to initialize a Response message.
|
| InitializeResponseMessage (IChannel, String, String, String) (declared in Message) |
|
|
| ProcessException protected (declared in Message) |
|
|
| Read (declared in Message) |
|
Calls the appropriate method for reading the given Type (such as ReadString or ReadInt32). If the type is unsupported, an exception is raised. Objects can be written to the Serializer using the Write method. You will usually not need to override this method when implementing a custom Serializer.
|
| ReadAnsiString (declared in Message) |
|
Should be implemented to read an ANSI String value from the message.
|
| ReadBoolean (declared in Message) |
|
|
| ReadCurrency (declared in Message) |
|
|
| ReadDateTime (declared in Message) |
|
|
| ReadDecimal (declared in Message) |
|
|
| ReadDouble (declared in Message) |
|
|
| ReadEnum (declared in Message) |
|
|
| ReadException |
|
Reads the current message as an exception, then returns a new Exception instance, properly initialized with the message values.
|
| ReadFromStream (declared in Message) |
|
Should be implemented to read the contents of the message from the given stream.
|
| ReadGuid (declared in Message) |
|
|
| ReadInt32 (declared in Message) |
|
|
| ReadInt64 (declared in Message) |
|
|
| ReadUtf8String (declared in Message) |
|
|
| ReadVariant (declared in Message) |
|
|
| ReadWideString (declared in Message) |
|
Should be implemented to read an Unicode Wide String value from the message.
|
| ReadXml (declared in Message) |
|
|
| SetAttributes (declared in Message) |
|
|
| TriggerAfterReadMessageParam (String, Object) protected (declared in Message) |
|
|
| TriggerAfterReadMessageParam (String, Object, Type) protected (declared in Message) |
|
|
| TriggerAfterReadMessageParam (String, Object, Type, StreamingFormat) protected (declared in Message) |
|
|
| TriggerAfterUnwrapEnvelopes protected (declared in Message) |
|
|
| TriggerAfterWrapEnvelopes protected (declared in Message) |
|
|
| TriggerBeforeUnwrapEnvelopes protected (declared in Message) |
|
|
| TriggerBeforeWrapEnvelopes protected (declared in Message) |
|
|
| TriggerBeforeWriteMessageParam (String, Object) protected (declared in Message) |
|
|
| TriggerBeforeWriteMessageParam (String, Object, Type) protected (declared in Message) |
|
|
| TriggerBeforeWriteMessageParam (String, Object, Type, StreamingFormat) protected (declared in Message) |
|
|
| TriggerOnFinalizeMessage protected (declared in Message) |
|
|
| TriggerOnInitializeMessage protected (declared in Message) |
|
|
| UnwrapEnvelopes protected (declared in Message) |
|
|
| Validate |
|
Checks if specified string begins with "RO" substring
|
| WrapEnvelopes protected (declared in Message) |
|
|
| Write (declared in Message) |
|
|
| WriteAnsiString (declared in Message) |
|
Should be implemented to write an ANSI String value to the message.
|
| WriteBoolean (declared in Message) |
|
|
| WriteCurrency (declared in Message) |
|
|
| WriteDateTime (declared in Message) |
|
|
| WriteDecimal (declared in Message) |
|
|
| WriteDouble (declared in Message) |
|
|
| WriteEnum (declared in Message) |
|
|
| WriteEnvelopeHeader (declared in Message) |
|
|
| WriteException |
|
Writes the given exception to the message.
|
| WriteGuid (declared in Message) |
|
|
| WriteInt32 (declared in Message) |
|
|
| WriteInt64 (declared in Message) |
|
|
| WriteToStream (MessageType, Stream) |
|
Writes the given stream to the message.
|
| WriteToStream (Stream) (declared in Message) |
|
|
| WriteUtf8String (declared in Message) |
|
|
| WriteVariant (declared in Message) |
|
|
| WriteWideString (declared in Message) |
|
|
| WriteXml (declared in Message) |
|
|
Events
| AfterReadMessageParam (declared in Message) |
|---|
|
Gets triggered after a parameter was read from the incoming message. You can use this event to inspect the parameter name, type and value.
|
| AfterUnwrapEnvelopes (declared in Message) |
|
|
| AfterWrapEnvelopes (declared in Message) |
|
|
| BeforeUnwrapEnvelopes (declared in Message) |
|
|
| BeforeWrapEnvelopes (declared in Message) |
|
|
| BeforeWriteMessageParam (declared in Message) |
|
Gets triggered before a parameter gets written to the outgoing message. You can use this event to inspect the parameter name, type and value.
|
| OnFinalizeMessage (declared in Message) |
|
Gets triggered when FinalizeMessage method was called to finalize an outgoing message just before it will be actually sent across the wire to the remote system.
|
| OnInitializeMessage (declared in Message) |
|
Gets triggered when InitializeMessage method is called to initialize an outgoing message. You can hook into this event to inspect information such as the service name and message (method) name, as well as the channel that the message is being dispatched through.
|
See Also
- BinMessage Class
- .NET
- Java
- Lists
- RemObjects SDK for .NET: Namespaces — Interfaces — Classes — Enums — Implements
- RemObjects SDK shared: Data Types – File Types
- other editions
- RemObjects SDK for Xcode: Protocols — Classes — Enums — Aliases — Implements
- RemObjects SDK for Delphi: Interfaces — Classes — Aliases — Implements
- RemObjects SDK for Java: Namespaces — Interfaces — Classes — Enums — Implements
- RemObjects SDK for JavaScript: Objects

Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript