subscribe

Subscribes the connection to the given channels.
Once subscribed, a connection
enters listening mode and can only subscribe to other channels or unsubscribe.
No other commands are accepted until the connection is unsubscribed.

Note that this operation is blocking and the current thread starts waiting
for new messages immediately.

Parameters:

listener - message listener

channels - channel names

pSubscribe

Subscribes the connection to all channels matching the given patterns.
Once subscribed, a connection
enters listening mode and can only subscribe to other channels or unsubscribe.
No other commands are accepted until the connection is unsubscribed.

Note that this operation is blocking and the current thread starts waiting
for new messages immediately.