Examples of TransportAddress


Examples of jade.mtp.TransportAddress

    private void uninstallMTP(String address) throws IMTPException, ServiceException, NotFoundException, MTPException {
     
      RoutingTable.MTPInfo info = routes.removeLocalMTP(address);
      if(info != null) {
        MTP proto = info.getMTP();
        TransportAddress ta = proto.strToAddr(address);
        proto.deactivate(ta);
        MTPDescriptor desc = info.getDescriptor();
        //MTPDescriptor desc = new MTPDescriptor(proto.getName(), proto.getClass().getName(), new String[] {address}, proto.getSupportedProtocols());
       
        String[] addresses = desc.getAddresses();
View Full Code Here

Examples of jade.mtp.TransportAddress

    // Create the ResourceManager
    myResourceManager = myProfile.getResourceManager();
    myResourceManager.initialize(myProfile);

    // Initialize the Container ID
    TransportAddress addr = (TransportAddress) myIMTPManager.getLocalAddresses().get(0);
    myID = new ContainerID(myProfile.getParameter(Profile.CONTAINER_NAME, PlatformManager.NO_NAME), addr);
    myNodeDescriptor = new NodeDescriptor(myID, myIMTPManager.getLocalNode());
  }
View Full Code Here

Examples of jade.mtp.TransportAddress

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    }
   
    TransportAddress otherTA = null;
    if (obj instanceof TransportAddressWrapper) {
      TransportAddressWrapper taw = (TransportAddressWrapper) obj;
      otherTA = taw.getAddress();
    }
    else if (obj instanceof TransportAddress) {
View Full Code Here

Examples of jade.mtp.TransportAddress

    myORB.disconnect(server);
  }

  public void deliver(String addr, Envelope env, byte[] payload) throws MTPException {
    try {
      TransportAddress ta = strToAddr(addr);
      IIOPAddress iiopAddr = (IIOPAddress)ta;
      FIPA.MTS objRef = iiopAddr.getObject();

      // verifies if the server object really exists (useful if the IOR is
      // valid, i.e corresponds to a good object) (e.g. old IOR)
View Full Code Here

Examples of jade.mtp.TransportAddress

      throw new MTPException("No server on address "+ta);
  }
 
  public void deactivate() throws MTPException {
    for(Enumeration it=addr2srv.keys(); it.hasMoreElements() ; ) {
      TransportAddress ta=(TransportAddress)it.nextElement();
      deactivate(ta);
    }
   
  }
View Full Code Here

Examples of jade.mtp.TransportAddress

 
  private void adjustMainURL() {
    //#MIDP_EXCLUDE_BEGIN
    try {
      String mainURL = theProfile.getParameter(MAIN_URL, null);
      TransportAddress ta = theDispatcher.stringToAddr(mainURL);
      java.net.InetAddress ad = java.net.InetAddress.getByName(ta.getHost());
      TransportProtocol tp = theDispatcher.getProtocol(ta.getProto());
      String hostAddr = ad.getHostAddress();
      if (hostAddr.equals("127.0.0.1")) {
        hostAddr = ad.getHostName();
      }
      ta = tp.buildAddress(hostAddr, ta.getPort(), ta.getFile(), ta.getAnchor());
      // DEBUG
      //System.out.println("MAIN URL set to "+tp.addrToString(ta));
      theProfile.setParameter(MAIN_URL, tp.addrToString(ta));
    }
    catch (Exception e) {
View Full Code Here

Examples of jade.mtp.TransportAddress

 
  synchronized PlatformManager getPlatformManagerProxy(Profile p) throws IMTPException {
    if(thePlatformManager == null) {
     
      PlatformManagerStub stub = new PlatformManagerStub(platformName);
      TransportAddress mainTA = initMainTA(p);
      stub.bind(this);
      stub.addTA(mainTA);
      setPlatformManager(stub);
    }
   
View Full Code Here

Examples of jade.mtp.TransportAddress

   
    // Try to translate the address into a TransportAddress
    // using a protocol supported by this CommandDispatcher
    try {
      PlatformManagerStub stub = new PlatformManagerStub(platformName);
      TransportAddress ta = stringToAddr(addr);
      stub.bind(this);
      stub.addTA(ta);
      return stub;
    }
    catch (DispatcherException de) {
View Full Code Here

Examples of jade.mtp.TransportAddress

   
  }
 
  public void addAddressToStub(Stub target, String toAdd) {
    try {
      TransportAddress ta = stringToAddr(toAdd);
      target.addTA(ta);
    }
    catch(DispatcherException de) {
      de.printStackTrace();
    }
View Full Code Here

Examples of jade.mtp.TransportAddress

    }
  }
 
  public void removeAddressFromStub(Stub target, String toRemove) {
    try {
      TransportAddress ta = stringToAddr(toRemove);
      target.removeTA(ta);
    }
    catch(DispatcherException de) {
      de.printStackTrace();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.