/** * Creates a new NetChannelOutput connected to the channel with the given vcn on the given Node, with the given * poison immunity level and uses the given filter to encode outgoing messages * * @param nodeID * The NodeID of the Node that the input channel resides on * @param vcn * The Virtual Channel Number of the input channel * @param immunityLevel * The immunity to poison that the channel has * @param filter * The filter that encodes the outgoing messages * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong with the underlying architecture */ public NetChannelOutput one2net(NodeID nodeID, int vcn, int immunityLevel, NetworkMessageFilter.FilterTx filter) //throws JCSPNetworkException { NetChannelLocation loc = new NetChannelLocation(nodeID, vcn); return(One2NetChannel.create(loc, immunityLevel, filter)); }
/** * Creates a new NetChannelOutput connected to the channel with the given vcn on the given Node * * @param nodeID * The NodeID of the node that the input channel resides on * @param vcn * The Virtual Channel Number of the input channel * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput one2net(NodeID nodeID, int vcn) //throws JCSPNetworkException { NetChannelLocation loc = new NetChannelLocation(nodeID, vcn); return(One2NetChannel.create(loc, Int32.MaxValue, new ObjectNetworkMessageFilter.FilterTX())); }
/** * Creates a new NetChannelOutput connected to the channel with the given vcn on the given Node which uses the given * filter to encode outgoing messages * * @param nodeAddr * The NodeAddress of the Node to connect to * @param vcn * The Virtual Channel Number of the input channel * @param filter * The filter used to encode outgoing messages * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput one2net(NodeAddress nodeAddr, int vcn, NetworkMessageFilter.FilterTx filter) //throws JCSPNetworkException { NodeID remoteNode = LinkFactory.getLink(nodeAddr).remoteID; NetChannelLocation loc = new NetChannelLocation(remoteNode, vcn); return(One2NetChannel.create(loc, Int32.MaxValue, filter)); }
/** * Creates a new NetChannelOutput connected to the channel with the given vcn on the given Node with the given * poison immunity * * @param nodeAddr * The NodeAddress of the Node to connect to * @param vcn * The Virtual Channel Number of the input channel * @param immunityLevel * The immunity to poison the channel has * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput one2net(NodeAddress nodeAddr, int vcn, int immunityLevel) //throws JCSPNetworkException { NodeID remoteNode = LinkFactory.getLink(nodeAddr).remoteID; NetChannelLocation loc = new NetChannelLocation(remoteNode, vcn); return(One2NetChannel.create(loc, immunityLevel, new ObjectNetworkMessageFilter.FilterTX())); }
/** * Static factory method used to create an Any2NetChannel * * @param loc * The location of the input channel end * @param immunity * The immunity level of the channel * @param filter * The filter used to convert the object being sent into bytes * @return A new Any2NetChannel connected to the input end. * @//throws JCSPNetworkException * Thrown if a connection to the Node cannot be made. */ internal static Any2NetChannel create(NetChannelLocation loc, int immunity, NetworkMessageFilter.FilterTx filter) { One2NetChannel channel = null; try { channel = One2NetChannel.create(loc, immunity, filter); } catch (JCSPNetworkException e) { Console.WriteLine(e); } return(new Any2NetChannel(channel)); }
/** * Creates a new NetChannelOutput connected to the input channel end with the given location * * @deprecated Use one2net instead * @param loc * The location to connect the output end to * @return A new NetChannelOutput connected to the input end at the given location * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput createOne2Net(NetChannelLocation loc) ////throws JCSPNetworkException { return(One2NetChannel.create(loc, Int32.MaxValue, new ObjectNetworkMessageFilter.FilterTX())); }
/** * Creates a new NetChannelOutput connected to the given location with the given poison immunity level, and uses the * given filter to encode outgoing messages. * * @param loc * The location of the input end of the channel * @param immunityLevel * The immunity to poison that this channel has * @param filter * The filter used to encode outgoing messages * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput one2net(NetChannelLocation loc, int immunityLevel, NetworkMessageFilter.FilterTx filter) //throws JCSPNetworkException { return(One2NetChannel.create(loc, immunityLevel, filter)); }
/** * Creates a new NetChannelOutput connected to the input end with the given NetChannelLocation, and uses the given * filter to encode outgoing messages * * @param loc * The location of the input end of the channel * @param filter * The filter used to encode outgoing messages * @return A new NetChannelOutput * @//throws JCSPNetworkException * Thrown if something goes wrong in the underlying architecture */ public NetChannelOutput one2net(NetChannelLocation loc, NetworkMessageFilter.FilterTx filter) //throws JCSPNetworkException { return(One2NetChannel.create(loc, Int32.MaxValue, filter)); }
/** * Constructor wrapping an existing One2NetChannel in an Any2NetChannel * * @param channel * The One2NetChannel to be wrapped. */ private Any2NetChannel(One2NetChannel channel) { this.chan = channel; }