|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.services.valet.ValetService
public abstract class ValetService
Valet Service is a special NiMKernelService that provides custodian service for holding resources that cannot be migrated to other servers in the same cluster.
For example, an application may have a IMAP mail server connection opened for a specific user. However, this user's HTTP Session can be migrated to other machines in the same cluster. Therefore, the application will either open and close the connection for every transaction, or park the connection somewhere on the machine's runtime memory. This ValetService is designed to provide this type of "resource parking" functions.
Constructor Summary | |
---|---|
ValetService()
|
Method Summary | |
---|---|
abstract ValetItem |
attachItem(ValetTicket ticket,
ValetItem item)
Invoked by the nugget to attach a new instance of the itemMap. |
abstract void |
populateItem(ValetTicket ticket)
Invoked by the ValetTicket's activate() method only. |
abstract void |
removeItem(ValetTicket ticket)
Invoked by the Nugget's destroyImpl() method to clean up the reference. |
abstract void |
signalBirth()
Invoked by the system's listener when the whole server is starting up. |
abstract void |
signalDeath()
Invoked by the system's listener when the whole server is shutting down. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValetService()
Method Detail |
---|
public abstract ValetItem attachItem(ValetTicket ticket, ValetItem item) throws ValetException
If the reference has nothing attached for the current node, the method should assign the ticket's _item field with the new object, update the ticket's node-id map and put the new item into this ValetService's id-item map.
If the reference has already got something assigned and the item is located in the id-item map, this service should simply use the existing item.
If the reference has already got something assigned and the item is not located in the id-item map, this service should replace that reference's node-id map with the new id and put the new id and item into the id-item map.
After a successful invocation, the ticket will contain the id of the item in the current node.
Please note that the resulting iteminside the ValetTicket object may not be the same as the one the caller passed in.
ValetException
public abstract void removeItem(ValetTicket ticket)
public abstract void populateItem(ValetTicket ticket)
public abstract void signalBirth()
public abstract void signalDeath()
|
Nitido NiM 2.5 Java API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2009 Nitido Inc. Proprietary and Confidential. All Rights Reserved.