|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.nitido.nimx.services.valet.ValetService
com.nitido.nimx.services.valet.ValetServiceImpl
public class ValetServiceImpl
The only implementation of the ValetService. It mantains the parked items in a HashMap that is kept in memory.
Field Summary | |
---|---|
protected NiM |
_confService
|
Constructor Summary | |
---|---|
ValetServiceImpl()
|
Method Summary | |
---|---|
ValetItem |
attachItem(ValetTicket ticket,
ValetItem item)
Invoked by the nugget to attach a new instance of the itemMap. |
static ValetServiceImpl |
getInstance()
This is the singleton static method to obtain the reference |
protected int |
getIntConfig(java.lang.String confKey,
int defaultValue)
|
protected ValetItem |
getItem(java.lang.String id)
|
protected java.util.ArrayList |
getItemIDs()
|
protected long |
getLongConfig(java.lang.String confKey,
long defaultValue)
|
protected void |
init(NiM confService)
|
void |
populateItem(ValetTicket ticket)
Invoked by the ValetTicket's activate() method only. |
void |
removeItem(ValetTicket ticket)
Invoked by the Nugget's destroyImpl() method to clean up the reference. |
void |
signalBirth()
Invoked by the system's listener when the whole server is starting up. |
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 |
Field Detail |
---|
protected NiM _confService
Constructor Detail |
---|
public ValetServiceImpl()
Method Detail |
---|
public static ValetServiceImpl getInstance()
protected void init(NiM confService) throws InitializationFailedException, NiMException
InitializationFailedException
NiMException
public 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 item inside the ValetTicket object may not be the same as the one the caller passed in.
attachItem
in class ValetService
ValetException
public void removeItem(ValetTicket ticket)
removeItem
in class ValetService
public void populateItem(ValetTicket ticket)
populateItem
in class ValetService
protected ValetItem getItem(java.lang.String id)
protected java.util.ArrayList getItemIDs()
public void signalBirth()
signalBirth
in class ValetService
public void signalDeath()
signalDeath
in class ValetService
protected int getIntConfig(java.lang.String confKey, int defaultValue) throws InitializationFailedException
InitializationFailedException
protected long getLongConfig(java.lang.String confKey, long defaultValue) throws InitializationFailedException
InitializationFailedException
|
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.