public URI getBaseURI() {
   return URI.create(
       this.getProtocolId()
           + "://"
           + ProActiveInet.getInstance().getHostname()
           + ":"
           + getPort()
           + "/");
 }
  public InternalRemoteRemoteObject createRemoteObject(
      RemoteObject<?> remoteObject, String name, boolean rebind) throws ProActiveException {
    URI uri =
        URIBuilder.buildURI(ProActiveInet.getInstance().getHostname(), name, this.getProtocolId());
    // register the object on the register
    InternalRemoteRemoteObject irro = new InternalRemoteRemoteObjectImpl(remoteObject, uri);
    RemoteRemoteObject rmo = register(irro, uri, rebind);
    irro.setRemoteRemoteObject(rmo);

    return irro;
  }
Exemple #3
0
 /** Method called when the object is redeployed on a new Node (Fault recovery, or migration). */
 private void readObject(java.io.ObjectInputStream in)
     throws java.io.IOException, ClassNotFoundException {
   in.defaultReadObject();
   hostName = ProActiveInet.getInstance().getInetAddress().getHostName();
 }
Exemple #4
0
 /**
  * Creates a container for a Planet, within a region of space.
  *
  * @param i The unique identifier of this Domain
  * @param planet The Planet controlled by this Domain
  */
 public Domain(Integer i, Planet planet) {
   identification = i.intValue();
   info = planet;
   hostName = ProActiveInet.getInstance().getInetAddress().getHostName();
 }
 // -- PRIVATE METHODS -----------------------------------------------
 //
 private static String getLocalHost() {
   return URIBuilder.getHostNameorIP(ProActiveInet.getInstance().getInetAddress());
 }