Package org.jcsp.lang

Class One2AnyConnectionImpl<T>

java.lang.Object
org.jcsp.lang.One2AnyConnectionImpl<T>
All Implemented Interfaces:
ConnectionWithSharedAltingServer<T>, One2AnyConnection<T>

class One2AnyConnectionImpl<T> extends Object implements One2AnyConnection<T>
This class is an implementation of One2AnyConnection. Each end is safe to be used by one thread at a time.
  • Field Details

  • Constructor Details

    • One2AnyConnectionImpl

      public One2AnyConnectionImpl()
      Initializes all the attributes to necessary values. Channels are created using the static factory in the ChannelServer interface. Constructor for One2OneConnectionImpl.
  • Method Details

    • client

      public AltingConnectionClient client()
      Returns the AltingConnectionClient that can be used by a single process at any instance. Each call to this method will return the same object reference.
      Specified by:
      client in interface One2AnyConnection<T>
      Returns:
      the AltingConnectionClient object.
    • server

      public SharedConnectionServer server()
      Returns a SharedConnectionServer object for this connection. This method can be called multiple times to return a new SharedConnectionServer object each time. Any object created can only be used by one process at a time but the set of objects constructed can be used concurrently.
      Specified by:
      server in interface ConnectionWithSharedAltingServer<T>
      Specified by:
      server in interface One2AnyConnection<T>
      Returns:
      a new SharedConnectionServer object.