Package edu.pdx.cs410J.net


package edu.pdx.cs410J.net

This package contains classes that demonstrates Java's networking and concurrent programming facilities.

Some networking and threading resources:

  • Classes
    Class
    Description
    This class demonstrates how concurrent access to a bank account needs to be synchronized in order to guarantee the balance is always correct.
    A BackAccount maintains a integer balance.
    A ChatCommunicator obtains a Socket and then creates a ChatSpeaker and a ChatListener that run in their own threads.
    A ChatListener runs in the background and listens for messages on a socket on localhost.
    This class represents a message that is passed between two ChatSessions.
    This class allows two people to chat.
    A ChatSpeaker runs in the background and sends ChatMessages over a Socket.
    A Counter is something that counts in its own thread.
    This class demonstrates concurrency in Java by having Big Bird and Mr.
    A client that connects to a DateServer and reads the Date sent to it as a String.
    A server that waits for a DateClient to connect to it.
    A worker thread that waits five seconds before returning the current date.
    This program dumps the contents of a URL to standard out.
    This class is used to demonstrate object serialization support for referential integrity.
    This program starts up a bunch of WorkingThreads and also starts an InterruptingThread that will interrupt each WorkingThread after a given number of seconds.
    This program listens to a socket.
    Uses a URLClassLoader to load a resource from a given URL.
    A McCustomer arrives a McDonalds and waits for a BigMac.
    This class models a McDonalds.
    This class represents an employee of a McDonalds who makes BigMacs(tm).
    This class demonstrates object serialization by reading an instance of Date from a file.
    This class demonstrates serialization support for referential integrity by deserializing a graph of GraphNodes.
    A Speaker sends strings over a Socket to a Listener.
    This class demonstrates obtains a lock before access the BankAccount.
    Synchronized methods ensure that the data in the balance is accessed correctly.
    Transfers money between two BankAccounts.
    This thread will work until and then wait until it is interrupted.
    Demonstrates serialization by writing an instance of Date to a file.
    This program constructs a graph of Nodes and serializes them to a file.