next up previous contents
Next: JChannel.Disconnect() Up: Initialization and de-initialization of Previous: Creation of JChannel

JChannel.Connect()

1.
JChannel calls ProtocolStack.Start()

2.
Start sends a START event from bottom of the stack upwards

3.
UDP initializes its sockets (unicast and multicast). From now on, it is able to receive messages. Then it sends a SET_LOCAL_ADDRESS event up the stack. This allows various layers to cache the local address of the stack. Then it sends a START_OK event up the stack.

4.
When ProtocolStack.Start receives the START_OK, it returns. (Note that there is also a timeout, if it expires, ProtocolStack.Start throws an exception)

5.
JChannel sends down a CONNECT event, waits for CONNECT_OK

6.
Various layers process this event and pass it down

7.
GMS passes the event down. Then it establishes the initial membership. Finally it passes up a CONNECT_OK event.

8.
JChannel.Connect() waits for CONNECT_OK event, or, it the timeout expires, returns without having received a CONNECT_OK.




1999-12-13