Serialization

This domain is a demonstration of the "serialization" features of ColdFrame.

Revision: $Revision: f9aa84fdea1e $

Contents

All classes

Class diagram for Serialization

Public Classes

Private Classes

Types

Exceptions


Public Classes

Interface

Context class diagram for Interface

Public instance operations

Open

Opens a TCP/IP connection to the remote host "On Host", using port "Using Port"., for the purpose of transmitting serialized data records to it.

Parameters:

On_Host : in String
Using_Port : in Port
Output

Creates a copy of the supplied value V, and posts it to the domain's event queue in a Posted Value event.

Parameters:

V : in Serializable

Private Classes

Server

Context class diagram for Server

Represents the remote Server, which we send serialized data to and which is responsible for recording it.

Identifying attributes

Id : Integer (autonumbering)

Normal attributes

Channel : Stream_Access

The stream used as the actual transmission mechanism to the remore server.

Sock : Socket

The IP Socket used to send data to the remote server.

States

Initial
Outputting
Running

Events

Posted_Value (payload of type Buffer)

State-Event Matrix

State Entry Action(s) Event Drop-through
Posted_Value
Initial none can't happen Running
Outputting Post can't happen Running
Running none Outputting none

State Diagram

State diagram for Serialization.Server

Public class operations

Create

Create an instance of Server, transmitting data to the remote server on host "Connecting To Host" using port "Using Port".

On successful return, the TCP/IP connection has been made.

Parameters:

Connecting_To_Host : in String
Using_Port : in Port

Public instance operations

Post

This entry action posts its parameter's payload to the output stream.

Parameters:

V : in Buffer

Types

Buffer

Contains a data record while it's in the event queue.

Imported from Serialization_Support.

Port

An IP port number.

Renames GNAT.Sockets.Port_Type.

Serializable

The class of all serializable records.

Renames Serialization_Support.Base_Class.

Serializable_Base

The base type from which all serializable records are derived.

Renames Serialization_Support.Base.

Socket

An IP socket.

Renames GNAT.Sockets.Socket_Type.

Stream_Access

Gives access to a Stream on a Socket.

Imported from GNAT.Sockets.

Exceptions

Use_Error

Raised if (for example) an attempt is made to open the domain when it's already open.