Package org.jcsp.lang

Class Any2AnyConnectionImpl<T>

java.lang.Object
org.jcsp.lang.AbstractConnectionImpl
org.jcsp.lang.Any2AnyConnectionImpl<T>
All Implemented Interfaces:
Any2AnyConnection<T>, ConnectionWithSharedAltingClient<T>, ConnectionWithSharedAltingServer<T>

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

  • Constructor Details

    • Any2AnyConnectionImpl

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

    • client

      Returns a SharedAltingConnectionClient object for this connection. This method can be called multiple times to return a new SharedAltingConnectionClient 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:
      client in interface Any2AnyConnection<T>
      Specified by:
      client in interface ConnectionWithSharedAltingClient<T>
      Returns:
      a new SharedAltingConnectionClient 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 Any2AnyConnection<T>
      Specified by:
      server in interface ConnectionWithSharedAltingServer<T>
      Returns:
      a new SharedConnectionServer object.