indexing
description: "Resources accessed over a network"
status: "See note at end of class"
date: "$Date$"
revision: "$Revision$"
deferred class interface
NETWORK_RESOURCE
feature
address: NETWORK_RESOURCE_URL
URL
bytes_transferred: INTEGER
Check_instruction: INTEGER is 7
EXCEP_CONST
Class_invariant: INTEGER is 6
EXCEP_CONST
Com_exception: INTEGER is 28
EXCEP_CONST
Developer_exception: INTEGER is 24
EXCEP_CONST
External_exception: INTEGER is 18
errno
EXCEP_CONST
Floating_point_exception: INTEGER is 5
EXCEP_CONST
hash_code: INTEGER
DATA_RESOURCE
ensure HASHABLE
good_hash_value: Result >= 0
Incorrect_inspect_value: INTEGER is 9
EXCEP_CONST
Io_exception: INTEGER is 21
EXCEP_CONST
last_packet: STRING
DATA_RESOURCE
last_packet_size: INTEGER
location: STRING
DATA_RESOURCE
require DATA_RESOURCE
address_exists: address /= void
Loop_invariant: INTEGER is 11
EXCEP_CONST
Loop_variant: INTEGER is 10
EXCEP_CONST
mode: INTEGER
DATA_RESOURCE
No_more_memory: INTEGER is 2
EXCEP_CONST
Operating_system_exception: INTEGER is 22
errno
EXCEP_CONST
port: INTEGER
DATA_RESOURCE
Postcondition: INTEGER is 4
EXCEP_CONST
Precondition: INTEGER is 3
EXCEP_CONST
read_buffer_size: INTEGER
Rescue_exception: INTEGER is 14
EXCEP_CONST
Retrieve_exception: INTEGER is 23
retrievedIO_MEDIUM
EXCEP_CONST
Routine_failure: INTEGER is 8
EXCEP_CONST
Runtime_io_exception: INTEGER is 27
EXCEP_CONST
service: STRING
DATA_RESOURCE
Signal_exception: INTEGER is 12
EXCEP_CONST
Void_assigned_to_expanded: INTEGER is 19
EXCEP_CONST
Void_call_target: INTEGER is 1
EXCEP_CONST
feature
count: INTEGER
DATA_RESOURCE
feature
is_equal (other: like Current): BOOLEAN
other
DATA_RESOURCE
require ANY
other_not_void: other /= void
ensure ANY
symmetric: Result implies other.is_equal (Current)
consistent: standard_is_equal (other) implies Result
feature
address_exists: BOOLEAN
assertion_violation: BOOLEAN
EXCEPTIONS
class_name: STRING
EXCEPTIONS
developer_exception_name: STRING
EXCEPTIONS
require EXCEPTIONS
applicable: is_developer_exception
error: BOOLEAN
DATA_RESOURCE
error_code: INTEGER
DATA_RESOURCE
error_text (code: INTEGER): STRING
DATA_RESOURCE_ERROR_CONSTANTS
require DATA_RESOURCE_ERROR_CONSTANTS
positive_code: code > 0
exception: INTEGER
EXCEPTIONS
exception_trace: STRING
EXCEPTIONS
has_packet: BOOLEAN
last_packet
DATA_RESOURCE
is_count_valid: BOOLEAN
count
is_developer_exception: BOOLEAN
EXCEPTIONS
is_developer_exception_of_name (name: STRING): BOOLEAN
name
EXCEPTIONS
is_hashable: BOOLEAN
DATA_RESOURCE
ensure HASHABLE
ok_if_not_default: Result implies (Current /= default)
is_mode_set: BOOLEAN
DATA_RESOURCE
is_open: BOOLEAN
is_packet_pending: BOOLEAN
is_proxy_supported: BOOLEAN
DATA_RESOURCE
is_proxy_used: BOOLEAN
is_readable: BOOLEAN
ensure DATA_RESOURCE
mode_unchanged: mode = old mode
is_signal: BOOLEAN
EXCEPTIONS
is_system_exception: BOOLEAN
EXCEPTIONS
is_writable: BOOLEAN
ensure DATA_RESOURCE
mode_unchanged: mode = old mode
meaning (except: INTEGER): STRING
except
EXCEPTIONS
original_class_name: STRING
EXCEPTIONS
original_exception: INTEGER
EXCEPTIONS
original_recipient_name: STRING
EXCEPTIONS
original_tag_name: STRING
EXCEPTIONS
read_mode: BOOLEAN
DATA_RESOURCE
recipient_name: STRING
EXCEPTIONS
supports_multiple_transactions: BOOLEAN
DATA_RESOURCE
tag_name: STRING
EXCEPTIONS
timeout: INTEGER
DATA_RESOURCE
transfer_initiated: BOOLEAN
DATA_RESOURCE
valid_mode (n: INTEGER): BOOLEAN
n
DATA_RESOURCE
write_mode: BOOLEAN
DATA_RESOURCE
feature
catch (code: INTEGER)
code
EXCEPTIONS
close
DATA_RESOURCE
require DATA_RESOURCE
open: is_open
ensure DATA_RESOURCE
closed: not is_open
mode_unchanged: mode = old mode
no_packet_available: not (has_packet and is_packet_pending)
die (code: INTEGER)
code
EXCEPTIONS
ignore (code: INTEGER)
code
EXCEPTIONS
initiate_transfer
DATA_RESOURCE
require DATA_RESOURCE
no_error_occurred: not error
mode_set: is_mode_set
open: is_open
not_initiated: not transfer_initiated
ensure DATA_RESOURCE
failure_means_error: not transfer_initiated implies error
message_on_failure
EXCEPTIONS
no_message_on_failure
EXCEPTIONS
open
DATA_RESOURCE
require DATA_RESOURCE
no_error_occurred: not error
mode_set: is_mode_set
ensure DATA_RESOURCE
no_packet_available: not (has_packet and is_packet_pending)
initiated_flag_reset: not transfer_initiated
failure_means_error: not is_open implies error
raise (name: STRING)
name
EXCEPTIONS
reset_error
DATA_RESOURCE
ensure DATA_RESOURCE
error_reset: not error
reset_proxy
DATA_RESOURCE
ensure DATA_RESOURCE
proxy_reset: not address.is_proxy_used
reuse_connection (other: DATA_RESOURCE)
other
require DATA_RESOURCE
other_exists: other /= void
same_type: same_type (other)
supports_multiple_transactions: supports_multiple_transactions and other.supports_multiple_transactions
other_opened: other.is_open
set_password (pw: STRING)
pw
DATA_RESOURCE
require DATA_RESOURCE
password_accepted: address.is_password_accepted
non_empty_password: pw /= void and then not pw.is_empty
set_port (port_no: INTEGER)
port_no
DATA_RESOURCE
require DATA_RESOURCE
closed: not is_open
non_negative_port_number: port_no >= 0
ensure DATA_RESOURCE
port_set: port = port_no
set_proxy (host: STRING; port_no: INTEGER)
hostport_no
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
closed: not is_open
non_empty_host: host /= void and then not host.is_empty
host_ok: address.proxy_host_ok (host)
non_negative_port: port_no >= 0
ensure DATA_RESOURCE
proxy_set: address.is_proxy_used
set_proxy_information (pi: PROXY_INFORMATION)
pi
DATA_RESOURCE
require DATA_RESOURCE
proxy_supported: is_proxy_supported
ensure DATA_RESOURCE
proxy_set: address.is_proxy_used
set_read_buffer_size (n: INTEGER)
require DATA_RESOURCE
size_positive: n > 0
ensure DATA_RESOURCE
buffer_size_set: read_buffer_size = n
set_read_mode
DATA_RESOURCE
ensure DATA_RESOURCE
read_mode_set: read_mode
set_timeout (n: INTEGER)
n
DATA_RESOURCE
require DATA_RESOURCE
non_negative: n >= 0
ensure DATA_RESOURCE
timeout_set: timeout = n
set_username (un: STRING)
un
DATA_RESOURCE
require DATA_RESOURCE
username_accepted: address.has_username
non_empty_username: un /= void and then not un.is_empty
set_write_mode
DATA_RESOURCE
ensure DATA_RESOURCE
write_mode_set: write_mode
feature
dispose
DATA_RESOURCE
feature
read
require DATA_RESOURCE
no_error_occurred: not error
open: is_open
transfer_initated: transfer_initiated
readable: is_readable
positive_read_buffer_size: read_buffer_size > 0
packet_pending: is_packet_pending
ensure DATA_RESOURCE
packet_received: is_packet_pending implies last_packet_size > 0
counter_correct: not error implies bytes_transferred = old bytes_transferred + last_packet_size
feature
put (other: DATA_RESOURCE)
other
require DATA_RESOURCE
no_error_occurred: not (error and other.error)
other_resource_exists: other /= void
resources_open: is_open and other.is_open
writable: is_writable
transfer_initated: transfer_initiated
invariant
main_socket_ok: (main_socket /= void and not error) implies main_socket.socket_ok
ANY
reflexive_equality: standard_is_equal (Current)
reflexive_conformance: conforms_to (Current)
DATA_RESOURCE
address_assigned: address /= void
timeout_non_negative: timeout >= 0
packet_constraint: not (has_packet xor last_packet /= void)
pending_constraint: is_packet_pending implies (is_open and is_readable and transfer_initiated)
error_definition: error = (error_code /= 0)
valid_count_constraint: count > 0 implies is_count_valid
mode_constraint: is_mode_set = read_mode xor write_mode
end -- NETWORK_RESOURCE