/* ------------------------------------------------------------ */ public void unsubscribeAll() { ChannelImpl[] subscriptions; synchronized (this) { subscriptions = _subscriptions; _subscriptions = new ChannelImpl[0]; } for (ChannelImpl channel : subscriptions) channel.unsubscribe(this); }
/** {@inheritDoc} */ public Channel getChannel(String name) { try { return ChannelImpl.getInstance(name); } catch (RuntimeException e) { logger.logThrow(Level.FINEST, e, "getChannel:{0} throws"); throw e; } }
/** {@inheritDoc} */ public Channel createChannel(String name, ChannelListener listener, Delivery delivery) { try { Channel channel = ChannelImpl.newInstance(name, listener, delivery, writeBufferSize); return channel; } catch (RuntimeException e) { logger.logThrow(Level.FINEST, e, "createChannel:{0} throws"); throw e; } }
private void doBufferReceived(final Packet packet) { if (ChannelImpl.invokeInterceptors(packet, incomingInterceptors, this) != null) { return; } synchronized (transferLock) { final Channel channel = channels.get(packet.getChannelID()); if (channel != null) { channel.handlePacket(packet); } } }
/** {@inheritDoc} */ public synchronized void run() { localMembers = ChannelImpl.getSessionRefIdsForNode(dataService, channelRefId, localNodeId); }
/** * Handles a channel {@code message} that the specified {@code session} is sending on the channel * with the specified {@code channelRefId}. This method is invoked from the {@code * ClientSessionHandler} of the given session, when it receives a {@code CHANNEL_MESSAGE} protocol * message. This method must be called from within a transaction. * * <p> * * @param channelRefId the channel ID, as a {@code BigInteger} * @param session the client session sending the channel message * @param message the channel message */ public void handleChannelMessage( BigInteger channelRefId, ClientSession session, ByteBuffer message) { ChannelImpl.handleChannelMessage(channelRefId, session, message); }