Skip to content

Parameter Settings

Wolfgang Keller edited this page Mar 14, 2025 · 4 revisions

Connection Parameter Settings

The following PARAMETERS are defined for the JennyNet network layer. They can be set to tailor this software for application specific needs. The parameters can be set either on a global level in the JennyNet or a Server class or individually for each Connection. When set on a global level, a parameter becomes active for all new connections which are created after this setting occurred. Settings on connections may be altered individually thereafter, however, only a reduced set of parameters can be altered when operations on a connection have started.

The parameters marked with an asterisk can only be modified before the connection is started.

Parameter Type Default Meaning
BASE_THREAD_PRIORITY int 5 priority of the service threads involved in data processing of the sending stream of this layer.
TRANSMIT_THREAD_PRIORITY int MAX-2 priority of the service threads involved in data processing of the receiving stream of this layer.
TRANSMISSION_PARCEL_SIZE* int 65536 the transport capacity in bytes of a single transmission-parcel.
OBJECT_QUEUE_CAPACITY* int 200 capacity of queues handling with user data objects.
PARCEL_QUEUE_CAPACITY* int 600 capacity of queues handling with transmission-parcels per connection.
TRANSMISSION_SPEED int -1 Baud setting in bytes per second for limitation of sending data over the network. -1 stands for no limitation, 0 for transmission silence.
ALIVE_PERIOD int 0 time (milliseconds) to define the interval by which ALIVE signals are to be sent from the remote station. 0 means that no ALIVE signals will be sent. Minimum of 5,000 if not 0.
CONFIRM_TIMEOUT int 30,000 time (milliseconds) to wait for a communication confirm of the remote station. Some protocol situations require to wait for a CONFIRM signal from remote.
IDLE_THRESHOLD int 0 amount of bytes exchanged with the remote end per minute (incoming or outgoing) to qualify a connection for BUSY or IDLE status (above or below threshold). 0 for ignore.
DELIVER_TOLERANCE int 10,000 time delay tolerable for user's digestion of a delivered event (ConnectionListener).
DELIVER_THREAD_USAGE enum GLOBAL kind of delivery-thread used to dispatch events, (GLOBAL, INDIVIDUAL)
SERIALISATION_METHOD int 0 code number for the object serialisation method used. 0 = Java-serialisation, 1 = Kryo, 2 = custom.
MAX_SERIALISE_SIZE int 100 MB maximum object serialisation size. objects leading to a larger serialisation size may cause a closing error in the connection. Does not affect file transmissions.
TRANSFER_ROOT_PATH File null root directory for incoming file transmissions. Null means that no transmissions are allowed.
TEMP_DIRECTORY File TEMP definition for a TEMP directory. Default is System.property "java.io.tmpdir".
CODING_CHARSET* Charset UTF-8 text encoding used layer internally only. Must be identical on both sides of a connection. Does not affect object serialisation.

Home | Prev | Next

Clone this wiki locally