Package org.jcsp.net
Class StandardNetChannelEndFactory
- java.lang.Object
-
- org.jcsp.net.StandardNetChannelEndFactory
-
- All Implemented Interfaces:
NetBufferedChannelEndFactory,NetChannelEndFactory,NetLabelledBufferedChannelEndFactory,NetLabelledChannelEndFactory
- Direct Known Subclasses:
UnacknowledgedNetChannelEndFactory
public class StandardNetChannelEndFactory extends java.lang.Object implements NetChannelEndFactory, NetLabelledChannelEndFactory, NetBufferedChannelEndFactory, NetLabelledBufferedChannelEndFactory
A standard implementation of the JCSP.NET Networked channel factory interaces.
-
-
Field Summary
Fields Modifier and Type Field Description private static StandardNetChannelEndFactoryinstanceprivate ProfilelinkProfile
-
Constructor Summary
Constructors Constructor Description StandardNetChannelEndFactory()StandardNetChannelEndFactory(Profile profile)Creates a factory that creates links using a given profile rather than the default one.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description NetSharedChannelOutputcreateAny2Net(NetChannelLocation loc)Constructs aNetSharedChannelOutputobject.NetSharedChannelInputcreateNet2Any()Constructs aNetSharedChannelInputobject.NetSharedChannelInputcreateNet2Any(java.lang.String label)Constructs aNetSharedChannelInputwhich has a VCN assigned with the specified label.NetSharedChannelInputcreateNet2Any(java.lang.String label, ChannelDataStore buffer)Constructs a bufferedNetSharedChannelInputwhich has a VCN assigned with the specified label.NetSharedChannelInputcreateNet2Any(ChannelDataStore buffer)Constructs aNetSharedChannelInputobject.NetAltingChannelInputcreateNet2One()Constructs aNetAltingChannelInputobject.NetAltingChannelInputcreateNet2One(java.lang.String label)Constructs aNetAltingChannelInputwhich has a VCN assigned with the specified label.NetAltingChannelInputcreateNet2One(java.lang.String label, ChannelDataStore buffer)Constructs a bufferedNetAltingChannelInputwhich has a VCN assigned with the specified label.NetAltingChannelInputcreateNet2One(ChannelDataStore buffer)Constructs aNetAltingChannelInputobject.NetChannelOutputcreateOne2Net(NetChannelLocation loc)Constructs aNetChannelOutputobject.static StandardNetChannelEndFactorygetDefaultInstance()
-
-
-
Field Detail
-
instance
private static StandardNetChannelEndFactory instance
-
linkProfile
private final Profile linkProfile
-
-
Constructor Detail
-
StandardNetChannelEndFactory
public StandardNetChannelEndFactory()
-
StandardNetChannelEndFactory
public StandardNetChannelEndFactory(Profile profile)
Creates a factory that creates links using a given profile rather than the default one.
-
-
Method Detail
-
getDefaultInstance
public static StandardNetChannelEndFactory getDefaultInstance()
-
createNet2One
public NetAltingChannelInput createNet2One()
Description copied from interface:NetChannelEndFactoryConstructs a
NetAltingChannelInputobject.- Specified by:
createNet2Onein interfaceNetChannelEndFactory- Returns:
- the constructed
NetAltingChannelInputobject. - See Also:
NetChannelEndFactory.createNet2One()
-
createNet2One
public NetAltingChannelInput createNet2One(java.lang.String label)
Description copied from interface:NetLabelledChannelEndFactoryConstructs aNetAltingChannelInputwhich has a VCN assigned with the specified label.- Specified by:
createNet2Onein interfaceNetLabelledChannelEndFactory- Parameters:
label- the label to apply to the channel's VCN.- Returns:
- the constructed
NetAltingChannelInputobject. - See Also:
NetLabelledChannelEndFactory.createNet2One(String)
-
createNet2One
public NetAltingChannelInput createNet2One(ChannelDataStore buffer)
Description copied from interface:NetBufferedChannelEndFactoryConstructs aNetAltingChannelInputobject.- Specified by:
createNet2Onein interfaceNetBufferedChannelEndFactory- Parameters:
buffer- theChannelDataStoreto use as a buffer.- Returns:
- the constructed
NetAltingChannelInputobject. - See Also:
NetBufferedChannelEndFactory.createNet2One(ChannelDataStore)
-
createNet2One
public NetAltingChannelInput createNet2One(java.lang.String label, ChannelDataStore buffer)
Description copied from interface:NetLabelledBufferedChannelEndFactoryConstructs a bufferedNetAltingChannelInputwhich has a VCN assigned with the specified label.- Specified by:
createNet2Onein interfaceNetLabelledBufferedChannelEndFactory- Parameters:
label- the label to apply to the channel's VCN.buffer- theChannelDataStoreto use.- Returns:
- the constructed
NetAltingChannelInputobject. - See Also:
NetLabelledBufferedChannelEndFactory.createNet2One(String, ChannelDataStore)
-
createNet2Any
public NetSharedChannelInput createNet2Any()
Description copied from interface:NetChannelEndFactoryConstructs a
NetSharedChannelInputobject.- Specified by:
createNet2Anyin interfaceNetChannelEndFactory- Returns:
- the constructed
NetSharedChannelInputobject. - See Also:
NetChannelEndFactory.createNet2Any()
-
createNet2Any
public NetSharedChannelInput createNet2Any(java.lang.String label)
Description copied from interface:NetLabelledChannelEndFactoryConstructs aNetSharedChannelInputwhich has a VCN assigned with the specified label.- Specified by:
createNet2Anyin interfaceNetLabelledChannelEndFactory- Parameters:
label- the label to apply to the channel's VCN.- Returns:
- the constructed
NetSharedChannelInputobject. - See Also:
NetLabelledChannelEndFactory.createNet2Any(String)
-
createNet2Any
public NetSharedChannelInput createNet2Any(ChannelDataStore buffer)
Description copied from interface:NetBufferedChannelEndFactoryConstructs aNetSharedChannelInputobject.- Specified by:
createNet2Anyin interfaceNetBufferedChannelEndFactory- Parameters:
buffer- theChannelDataStoreto use as a buffer.- Returns:
- the constructed
NetSharedChannelInputobject. - See Also:
NetBufferedChannelEndFactory.createNet2Any(ChannelDataStore)
-
createNet2Any
public NetSharedChannelInput createNet2Any(java.lang.String label, ChannelDataStore buffer)
Description copied from interface:NetLabelledBufferedChannelEndFactoryConstructs a bufferedNetSharedChannelInputwhich has a VCN assigned with the specified label.- Specified by:
createNet2Anyin interfaceNetLabelledBufferedChannelEndFactory- Parameters:
label- the label to apply to the channel's VCN.buffer- theChannelDataStoreto use.- Returns:
- the constructed
NetSharedChannelInputobject. - See Also:
NetLabelledBufferedChannelEndFactory.createNet2Any(String, ChannelDataStore)
-
createOne2Net
public NetChannelOutput createOne2Net(NetChannelLocation loc)
Description copied from interface:NetChannelEndFactoryConstructs a
NetChannelOutputobject.- Specified by:
createOne2Netin interfaceNetChannelEndFactory- Returns:
- the constructed
NetChannelOutputobject. - See Also:
NetChannelEndFactory.createOne2Net(NetChannelLocation)
-
createAny2Net
public NetSharedChannelOutput createAny2Net(NetChannelLocation loc)
Description copied from interface:NetChannelEndFactoryConstructs a
NetSharedChannelOutputobject.- Specified by:
createAny2Netin interfaceNetChannelEndFactory- Returns:
- the constructed
NetSharedChannelOutputobject. - See Also:
NetChannelEndFactory.createAny2Net(NetChannelLocation)
-
-