Package eu.mosaic_cloud.interoperability.core

Examples of eu.mosaic_cloud.interoperability.core.RoleSpecification


  @Override
  public final void accept (final SessionSpecification specification, final SessionCallbacks callbacks)
  {
    Preconditions.checkNotNull (specification);
    Preconditions.checkNotNull (callbacks);
    final RoleSpecification selfRole = specification.getSelfRole ();
    final RoleSpecification peerRole = specification.getPeerRole ();
    final String selfRoleIdentifier = selfRole.getIdentifier ();
    final String peerRoleIdentifier = peerRole.getIdentifier ();
    Preconditions.checkNotNull (selfRoleIdentifier);
    Preconditions.checkNotNull (peerRoleIdentifier);
    final String acceptorKey = selfRoleIdentifier + "//" + peerRoleIdentifier;
    final Acceptor acceptor = new Acceptor (acceptorKey, selfRoleIdentifier, peerRoleIdentifier, specification, callbacks);
    synchronized (this.state.monitor) {
View Full Code Here


  public final void connect (final String peer, final SessionSpecification specification, final Message message, final SessionCallbacks callbacks)
  {
    Preconditions.checkNotNull (peer);
    Preconditions.checkNotNull (specification);
    Preconditions.checkNotNull (callbacks);
    final RoleSpecification selfRole = specification.getSelfRole ();
    final RoleSpecification peerRole = specification.getPeerRole ();
    final String selfRoleIdentifier = selfRole.getIdentifier ();
    final String peerRoleIdentifier = peerRole.getIdentifier ();
    Preconditions.checkNotNull (selfRoleIdentifier);
    Preconditions.checkNotNull (peerRoleIdentifier);
    Preconditions.checkArgument (message.specification.getType () == MessageType.Initiation);
    final String sessionIdentifier = UUID.randomUUID ().toString ();
    synchronized (this.state.monitor) {
View Full Code Here

  @Override
  public final void register (final SessionSpecification specification)
  {
    // FIXME: We shouldn't allow the same specification to be registered twice.
    Preconditions.checkNotNull (specification);
    final RoleSpecification selfRole = specification.getSelfRole ();
    final RoleSpecification peerRole = specification.getPeerRole ();
    final String selfRoleIdentifier = selfRole.getIdentifier ();
    final String peerRoleIdentifier = peerRole.getIdentifier ();
    Preconditions.checkNotNull (selfRoleIdentifier);
    Preconditions.checkNotNull (peerRoleIdentifier);
    this.transcript.traceDebugging ("registering session `%s`...", specification.getQualifiedName ());
    final LinkedList<Coder> coders = new LinkedList<Coder> ();
    for (final MessageSpecification messageSpecification : specification.getMessages ()) {
View Full Code Here

TOP

Related Classes of eu.mosaic_cloud.interoperability.core.RoleSpecification

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.