Next: Consoles
Up: External Resources
Previous: Primitives
  Contents
- open
- Opens the resource for usage within the system.
- close
- Closes the resource, releasing related administrative
data; this happens automatically during garbage collection, but it
is poor practice to rely upon this.
- enable
- Creates the external resource represented (used
by open).
- isOpen
- answers whether the resource is open or closed.
- isActive
- answers whether the resource is active.
- restart
- restarts the resource if it's already active.
- flush
- flushes any unwritten elements.
- commit
- commits all pending write-out information to the
resource. Commit performs a flush but also ensures that the data is
actually sent to the peer.
- read:startingAt:into:
- calls read:from:startingAt:into:
with the resource's handle.
- write:startingAt:from:
- calls write:to:startingAt:from:
with the resource's handle.
- interactor
- returns a ReadWriteStream for accessing
the resource. Unlike the stream that iterator returns, interactor
is expected to return a coupled pair of a ReadStream and
WriteStream over the same resource, synchronized to preserve
the resource's behavior.
- bufferSize
- answers a sensible buffer size for interaction,
possibly dynamically determined.
- defaultBufferSize
- answers a default sensible buffer size
for interaction.
- locator
- answers a suitable structured object for dealing
with that resource's identity/location.
- sessionDo:
- executes a code block with the resource as its
argument, opening and closing the resource transparently to the block,
even for abnormal terminations.
Next: Consoles
Up: External Resources
Previous: Primitives
  Contents
Brian Rice
2004-08-24