aleph.comm.tcp
Class AutoConnection

java.lang.Object
  |
  +--aleph.comm.tcp.Connection
        |
        +--aleph.comm.tcp.AutoConnection

public class AutoConnection
extends Connection

An AutoConnection is a connection from a PE to itself.


Fields inherited from class aleph.comm.tcp.Connection
messagesSent
 
Constructor Summary
AutoConnection()
          Constructor for incoming connection.
 
Method Summary
 void close()
          Close socket and let thread die naturally.
 void flush()
          Flush output stream.
 boolean ping()
          Ping output stream.
protected  Message receive()
          Blocking method that pulls in the next message.
 void send(Message message)
          Send'em a message.
 
Methods inherited from class aleph.comm.tcp.Connection
start
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoConnection

public AutoConnection()
Constructor for incoming connection.
Parameters:
socket - use this socket
Method Detail

close

public void close()
Close socket and let thread die naturally.
Overrides:
close in class Connection

flush

public void flush()
           throws java.io.InterruptedIOException
Flush output stream.
Overrides:
flush in class Connection

ping

public boolean ping()
Ping output stream.
Overrides:
ping in class Connection

send

public void send(Message message)
          throws java.io.IOException
Send'em a message.
Parameters:
message - what to send
Throws:
java.io.IOException - something's wrong
Overrides:
send in class Connection

receive

protected Message receive()
Blocking method that pulls in the next message.
Overrides:
receive in class Connection