ManagedObjectFactory
A managed object factory is a special case object that can be used to create objects that need to be tracked over time. Any piece of code in an extension can call a managed object factory and request or return an object to it. An excellent use for managed object factories is accessing a database connection pool. In this case, the connection itself is the managed object and the factory is the pool manager
ManagedObjectFactoryLifeCycle
2008/9/22
2008/9/18
cancelScheduledExecution,排程
cancelScheduledExecution
int scheduleExecutionFromScript(int interval, int numberOfTimes, String callbackName)
伺服器端的排程執行程式,
interval,執行間隔,以千分之一秒為單位
numerOfTimes,次數,-1代表無限次
callbackName,所要執行的方法
另外,可以透過cancelScheduledExecution方法取消
詳細請參考 http://www.electro-server.com/documentation/docs/es4/server/extension/com/electrotank/electroserver4/extensions/api/ElectroServerApi.html#cancelScheduledExecution(int)
int scheduleExecutionFromScript(int interval, int numberOfTimes, String callbackName)
伺服器端的排程執行程式,
interval,執行間隔,以千分之一秒為單位
numerOfTimes,次數,-1代表無限次
callbackName,所要執行的方法
另外,可以透過cancelScheduledExecution方法取消
詳細請參考 http://www.electro-server.com/documentation/docs/es4/server/extension/com/electrotank/electroserver4/extensions/api/ElectroServerApi.html#cancelScheduledExecution(int)
ElectroServer 從plug-in 送訊息給使用者
給使用者
給room全體
EsObject message = new EsObject();
message.setString( TAG_ACTION, TAG_ACTION_CURRENTSTATE);
message.setInteger( TAG_GAMESTATE , gameState);
message.setInteger( TAG_TIME_LEFT, nextEvent - tickerCount );
//發訊訊息
getApi().sendPluginMessageToUser( userName , message );
給room全體
// tell players to start the countdown
EsObject message = new EsObject();
message.setString(TAG_ACTION, TAG_ACTION_COUNTDOWN);
message.setInteger(TAG_TIME_LEFT, nextEvent - tickerCount);
getApi().sendPluginMessageToRoom(getApi().getZoneId(),
getApi().getRoomId(), message);
2008/9/17
訂閱:
文章 (Atom)