FRODO Version 2.19.1
An open-source framework for Distributed Constraint Optimization (DCOP)
Loading...
Searching...
No Matches
frodo2.communication.tcp.QueueInputPipeTCP Class Reference

This is a queue input pipe that receives messages through TCP. More...

Inheritance diagram for frodo2.communication.tcp.QueueInputPipeTCP:

Classes

class  Receiver
 Whenever a request for connection is received, one such a thread is spawn to establish the connection. More...

Public Member Functions

 QueueInputPipeTCP (Queue queue, int port, Integer maxNbrConnections) throws IOException
 Constructor.
void start ()
void run ()
 Waits for requests for connection from senders, and creates Receivers.
void close ()
String toDOT ()

Package Functions

 QueueInputPipeTCP (Queue queue, int port) throws IOException
 Constructor.

Private Attributes

ServerSocket servSocket = null
 The server socket used to listen to connection requests from message senders.
ArrayList< Socket > sockets
 Currently active sockets from which messages are being read.
Integer nbrConnections
 The number of connection requests currently still allowed.
Queue queue
 This pipe's queue.

Detailed Description

This is a queue input pipe that receives messages through TCP.

Author
Thomas Leaute

Constructor & Destructor Documentation

◆ QueueInputPipeTCP() [1/2]

frodo2.communication.tcp.QueueInputPipeTCP.QueueInputPipeTCP ( Queue queue,
int port,
Integer maxNbrConnections ) throws IOException

Constructor.

Notifies the queue.

Parameters
queuethe queue messages should be passed to
portport number used to listen for incoming messages
maxNbrConnectionsmaximum number of connection requests allowed. If null, there is no limit.
Exceptions
IOExceptionthrown if an I/O error occurred

References nbrConnections, queue, servSocket, sockets, and start().

Referenced by frodo2.communication.tcp.QueueInputPipeTCP.Receiver.Receiver().

Here is the call graph for this function:

◆ QueueInputPipeTCP() [2/2]

frodo2.communication.tcp.QueueInputPipeTCP.QueueInputPipeTCP ( Queue queue,
int port ) throws IOException
package

Constructor.

Notifies the queue. Listens to an unlimited number of connection requests.

Parameters
queuethe queue messages should be passed to
portport number used to listen for incoming messages
Exceptions
IOExceptionthrown if an I/O error occurred

References queue.

Member Function Documentation

◆ close()

void frodo2.communication.tcp.QueueInputPipeTCP.close ( )

◆ run()

void frodo2.communication.tcp.QueueInputPipeTCP.run ( )

Waits for requests for connection from senders, and creates Receivers.

References nbrConnections, and servSocket.

◆ start()

void frodo2.communication.tcp.QueueInputPipeTCP.start ( )
See also
java.lang.Thread#start()

Referenced by QueueInputPipeTCP().

◆ toDOT()

String frodo2.communication.tcp.QueueInputPipeTCP.toDOT ( )

Member Data Documentation

◆ nbrConnections

Integer frodo2.communication.tcp.QueueInputPipeTCP.nbrConnections
private

The number of connection requests currently still allowed.

Referenced by QueueInputPipeTCP(), and run().

◆ queue

Queue frodo2.communication.tcp.QueueInputPipeTCP.queue
private

This pipe's queue.

Referenced by QueueInputPipeTCP(), and QueueInputPipeTCP().

◆ servSocket

ServerSocket frodo2.communication.tcp.QueueInputPipeTCP.servSocket = null
private

The server socket used to listen to connection requests from message senders.

Referenced by close(), QueueInputPipeTCP(), run(), and toDOT().

◆ sockets

ArrayList<Socket> frodo2.communication.tcp.QueueInputPipeTCP.sockets
private

Currently active sockets from which messages are being read.

Referenced by close(), and QueueInputPipeTCP().


The documentation for this class was generated from the following file: