|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--solar.service.BaseService
|
+--solar.service.mhost.SolarMobileHostService
Solar implementation of mobile host service.
| Field Summary | |
protected java.util.List |
_attached
|
protected DispatchService |
_dispatch
|
protected java.util.List |
_listeners
|
protected static org.apache.log4j.Logger |
_log
Logging facility. |
protected java.lang.String |
_mclientName
|
protected RpcService |
_rpc
|
protected boolean |
_server
|
protected Address |
_transportAddress
|
protected java.lang.String |
_transportName
|
| Fields inherited from class solar.service.BaseService |
_inited, _manager, _name |
| Fields inherited from interface solar.service.rpc.RpcConstants |
RPC_BLOCK, RPC_HANDLER, RPC_REPLY, RPC_REQUEST, RPC_TIMEOUT |
| Constructor Summary | |
SolarMobileHostService()
|
|
| Method Summary | |
void |
addListener(MobileHostListener listener)
Add a listener to client mobililty. |
void |
attach(Address address)
Have the client explicitly attch to a Planet. |
private java.lang.Object |
callRpc(Address address,
Request request)
|
void |
detach(Address address)
Have the client explicitly detach from a Planet. |
java.util.List |
getAttachedClients()
Get all the clients currently attached to this Planet. |
Address |
getAttachedServer()
Get the Planet address to which this client is attached. |
void |
init()
Initiate the service, do not try to init dependent services here. |
void |
initDependents()
Initialize dependent services here. |
boolean |
isAttached()
Detemine whether this client is attched. |
boolean |
isAttached(Address client)
Detemine whether the specified client is attched to this Planet. |
private void |
notifyClientAttached(Address address)
|
private void |
notifyClientDetached(Address address)
|
void |
removeListener(MobileHostListener listener)
Remove a listener to client mobililty. |
| Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, handleEvent, handleRequest, hasInited, init, setInited, setName, setServiceManager, start, stop |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface solar.service.Service |
getName, getServiceManager, handleDispatchUnit, hasInited, setName, setServiceManager, start, stop |
| Methods inherited from interface solar.api.EventHandler |
handleEvent |
| Methods inherited from interface solar.api.RequestHandler |
handleRequest |
| Field Detail |
protected static org.apache.log4j.Logger _log
protected boolean _server
protected java.lang.String _mclientName
protected java.lang.String _transportName
protected Address _transportAddress
protected RpcService _rpc
protected DispatchService _dispatch
protected java.util.List _attached
protected java.util.List _listeners
| Constructor Detail |
public SolarMobileHostService()
| Method Detail |
public void init()
throws ServiceException
Service
init in interface Serviceinit in class BaseServiceServiceException
public void initDependents()
throws ServiceException
Service
initDependents in interface ServiceinitDependents in class BaseServiceServiceException
public void attach(Address address)
throws MobileHostException
MobileHostService
attach in interface MobileHostServiceMobileHostException
public void detach(Address address)
throws MobileHostException
MobileHostService
detach in interface MobileHostServiceMobileHostExceptionpublic boolean isAttached()
MobileHostService
isAttached in interface MobileHostServicepublic boolean isAttached(Address client)
MobileHostService
isAttached in interface MobileHostServicepublic Address getAttachedServer()
MobileHostService
getAttachedServer in interface MobileHostServicepublic java.util.List getAttachedClients()
MobileHostService
getAttachedClients in interface MobileHostServicepublic void addListener(MobileHostListener listener)
MobileHostService
addListener in interface MobileHostServicepublic void removeListener(MobileHostListener listener)
MobileHostService
removeListener in interface MobileHostService
private java.lang.Object callRpc(Address address,
Request request)
throws RpcException
RpcExceptionprivate void notifyClientAttached(Address address)
private void notifyClientDetached(Address address)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||