mobileplacedisconnectioncommand.java

来自「一个agent 工具包,可以开发移动设备应用,考虑了安全措施」· Java 代码 · 共 32 行

JAVA
32
字号
package SOMA.mobilePlace;

import SOMA.naming.*;
import SOMA.network.connection.Command;

/** Comando di registrazione del {@link MobilePlaceNameService PNS} di un place mobile presso il PNS del default place.
*
* @author Livio Profiri
*/
public class MobilePlaceDisconnectionCommand extends Command
{
  PlaceID myPlaceID;

  /** Costruttore */
  public MobilePlaceDisconnectionCommand( PlaceID myPlaceID )
  {
    this.myPlaceID = myPlaceID;
  }

  public void run()
  {
    // Mancano i Controlli di sicurezza!!!

    // Aggiorno la posizione del place mobile sulla home
    env.networkManager.sendCommand( ((MobilePlaceID)(myPlaceID)).getHome(),
        new MobilePlaceConnectionCommand.UpdateHomePositionCommand(
           myPlaceID,
           MobilePlaceManager.DISCONNECTED ) );

    env.placeNameService.removePlace( myPlaceID );
  }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?