private ChannelImpl(ChannelBuilder base) { if (base.getKey() == null) { this._key = new ChannelKey( base.getChannelId() ); } else { this._key = base.getKey(); this._channelId = _key.getChannelId();
/** * get the Channel identifier belongs to a particular topology * * @param topologyId * topology id * @param ChannelId * Channel id * @return Channel identifier */ public static InstanceIdentifier<Channel> getChannelIdentifier(String topologyId, String ChannelId) { return InstanceIdentifier.builder(UscTopology.class) .child(Topology.class, new TopologyKey(new TopologyId(topologyId))) .child(Channel.class, new ChannelKey(new ChannelId(ChannelId))).build(); }
public synchronized void updateChannel(Channel channel, Session session, boolean removeFlag) { Session oldSession = getSession(channel, session.getSessionId().getValue()); if (oldSession != null) { channel.getSession().remove(oldSession); } if (!removeFlag) { channel.getSession().add(session); } String destinationId = channel.getDestination().getDestNode().getValue(); Node deviceNode = UscTopologyFactory.createNode(destinationId, UscTopologyService.NODE_TYPE_NETWORK_DEVICE); channel = UscTopologyFactory.createChannel(getLocalController(), deviceNode, channel.getKey().getChannelId() .getValue(), channel.getChannelType(), UscTopologyFactory.isCallHome(channel.getCallHome()), channel.getBytesIn(), channel.getBytesOut(), channel.getChannelAlarm(), channel.getSession()); updateChannel(channel); }
long bytesIn, long bytesOut, List<ChannelAlarm> alarms, List<Session> sessions) { ChannelId channelId = new ChannelId(id); ChannelKey channelKey = new ChannelKey(channelId); SourceBuilder sourceBuilder = new SourceBuilder(); sourceBuilder.setSourceNode(source.getNodeId());
public synchronized void updateTransaction(Channel channel, Session session, long bytesIn, long bytesOut) { Session oldSession = getSession(channel, session.getSessionId().getValue()); if (oldSession != null) { channel.getSession().remove(oldSession); } channel.getSession().add(session); String destinationId = channel.getDestination().getDestNode().getValue(); Node deviceNode = UscTopologyFactory.createNode(destinationId, UscTopologyService.NODE_TYPE_NETWORK_DEVICE); channel = UscTopologyFactory.createChannel(getLocalController(), deviceNode, channel.getKey().getChannelId() .getValue(), channel.getChannelType(), UscTopologyFactory.isCallHome(channel.getCallHome()), channel.getBytesIn() + bytesIn, channel.getBytesOut() + bytesOut, channel.getChannelAlarm(), channel.getSession()); updateChannel(channel); }
public ChannelBuilder(Channel base) { if (base.getKey() == null) { this._key = new ChannelKey( base.getChannelId() ); } else { this._key = base.getKey(); this._channelId = _key.getChannelId();