Package org.apache.cloudstack.framework.transport

Examples of org.apache.cloudstack.framework.transport.TransportAddress


  }
 
  @Override
  public TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress) {
   
    TransportAddress transportAddress;
    String endpointId;
    if(predefinedAddress != null && !predefinedAddress.isEmpty()) {
      endpointId = predefinedAddress;
      transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId, 0);
    } else {
      endpointId = String.valueOf(getNextEndpointId());
      transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId);
    }
   
    TransportEndpointSite endpointSite;
    synchronized(this) {
      endpointSite = _endpointMap.get(endpointId);
      if(endpointSite != null) {
        // already attached
        return endpointSite;
      }
      endpointSite = new TransportEndpointSite(this, endpoint, transportAddress);
      _endpointMap.put(endpointId, endpointSite);
    }
   
    endpoint.onAttachConfirm(true, transportAddress.toString());
    return endpointSite;
  }
View Full Code Here


    dispatchPdu(pdu);
  }
 
  private void dispatchPdu(TransportPdu pdu) {
   
    TransportAddress transportAddress = TransportAddress.fromAddressString(pdu.getDestAddress());
   
    if(isLocalAddress(transportAddress)) {
      TransportEndpointSite endpointSite = null;
      synchronized(this) {
        endpointSite = _endpointMap.get(transportAddress.getEndpointId());
      }
     
      if(endpointSite != null)
        endpointSite.addOutputPdu(pdu);
    } else {
View Full Code Here

    }

    @Override
    public TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress) {

        TransportAddress transportAddress;
        String endpointId;
        if (predefinedAddress != null && !predefinedAddress.isEmpty()) {
            endpointId = predefinedAddress;
            transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId, 0);
        } else {
            endpointId = String.valueOf(getNextEndpointId());
            transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId);
        }

        TransportEndpointSite endpointSite;
        synchronized (this) {
            endpointSite = _endpointMap.get(endpointId);
            if (endpointSite != null) {
                // already attached
                return endpointSite;
            }
            endpointSite = new TransportEndpointSite(this, endpoint, transportAddress);
            _endpointMap.put(endpointId, endpointSite);
        }

        endpoint.onAttachConfirm(true, transportAddress.toString());
        return endpointSite;
    }
View Full Code Here

        dispatchPdu(pdu);
    }

    private void dispatchPdu(TransportPdu pdu) {

        TransportAddress transportAddress = TransportAddress.fromAddressString(pdu.getDestAddress());

        if (isLocalAddress(transportAddress)) {
            TransportEndpointSite endpointSite = null;
            synchronized (this) {
                endpointSite = _endpointMap.get(transportAddress.getEndpointId());
            }

            if (endpointSite != null)
                endpointSite.addOutputPdu(pdu);
        } else {
View Full Code Here

  }
 
  @Override
  public TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress) {
   
    TransportAddress transportAddress;
    String endpointId;
    if(predefinedAddress != null && !predefinedAddress.isEmpty()) {
      endpointId = predefinedAddress;
      transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId, 0);
    } else {
      endpointId = String.valueOf(getNextEndpointId());
      transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId);
    }
   
    TransportEndpointSite endpointSite;
    synchronized(this) {
      endpointSite = _endpointMap.get(endpointId);
      if(endpointSite != null) {
        // already attached
        return endpointSite;
      }
      endpointSite = new TransportEndpointSite(this, endpoint, transportAddress);
      _endpointMap.put(endpointId, endpointSite);
    }
   
    endpoint.onAttachConfirm(true, transportAddress.toString());
    return endpointSite;
  }
View Full Code Here

    dispatchPdu(pdu);
  }
 
  private void dispatchPdu(TransportPdu pdu) {
   
    TransportAddress transportAddress = TransportAddress.fromAddressString(pdu.getDestAddress());
   
    if(isLocalAddress(transportAddress)) {
      TransportEndpointSite endpointSite = null;
      synchronized(this) {
        endpointSite = _endpointMap.get(transportAddress.getEndpointId());
      }
     
      if(endpointSite != null)
        endpointSite.addOutputPdu(pdu);
    } else {
View Full Code Here

TOP

Related Classes of org.apache.cloudstack.framework.transport.TransportAddress

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.