public final class ClientReceiver extends StreamReceiver
Modifier and Type | Method and Description |
---|---|
static ClientReceiver |
connect(Connector connector,
Address address)
Factory method that makes a TCP connection and returns a corresponding
Receiver . |
void |
shutdown()
Cleanly shut down the
Receiver . |
waitForMessage
public static ClientReceiver connect(Connector connector, Address address) throws CommunicationException
Receiver
.connector
- Connector to use to make the connection to the server.address
- The address of this ClientReceiver - can be used with
FanOutServerSender.send(Address, Message)
.CommunicationException
- If failed to connect.public void shutdown()
Receiver
. Ignore errors,
connection has probably been reset by peer.shutdown
in interface Receiver
shutdown
in class StreamReceiver
Copyright © 2000-2014. All Rights Reserved.