|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Connection upcall interface for receiveports. An Ibis implementation may choose to block while processing these upcalls.
Method Summary | |
boolean |
gotConnection(ReceivePort me,
SendPortIdentifier applicant)
Upcall that indicates that a new connection is being initiated by a SendPort . |
void |
lostConnection(ReceivePort me,
SendPortIdentifier johnDoe,
java.lang.Exception reason)
Upcall that indicates that a connection to a sendport was lost. |
Method Detail |
public boolean gotConnection(ReceivePort me, SendPortIdentifier applicant)
SendPort
.
If a ReceivePort
has been configured with connection upcalls,
this upcall is generated for each attempt to set up a connection
with this ReceivePort
.
This upcall should return true to accept the connection and false to
refuse the connection.
If the connection is refused, the connect call at the
SendPort
throws a ConnectionRefusedException
.
This upcall may run completely asynchronously, but only at most one is alive at any time.
me
- the ReceivePort
receiving a connection attempt.applicant
- identifier for the SendPort
attempting to
set up a connection.public void lostConnection(ReceivePort me, SendPortIdentifier johnDoe, java.lang.Exception reason)
ReceivePort
has been configured with connection upcalls,
an upcall is generated for each connection that is lost.
This may be because the sender just closed the connection,
or it may be because there is some problem with the connection itself.
This upcall may run completely asynchronously, but only at most one is alive at any time.
me
- the ReceivePort
losing a connection.johnDoe
- identifier for the SendPort
to which the
connection is lost.reason
- the reason for this upcall.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |