|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.BaseService | +--solar.service.dispatch.SolarDispatchService
An event disptaching service for Solar. This dispatch service requires a transport service.
Nested Class Summary | |
(package private) class |
SolarDispatchService.NetListener
|
Field Summary | |
protected static org.apache.log4j.Logger |
_log
Logging facility. |
protected ServiceManager |
_manager
Service manager. |
protected Queue |
_queue
Inbound event queue. |
protected java.util.Hashtable |
_transports
A table of transport services. |
Fields inherited from class solar.service.BaseService |
_inited, _name |
Constructor Summary | |
SolarDispatchService()
|
Method Summary | |
void |
dispatchEvent(Event evt,
Address dest,
java.lang.String service,
java.lang.String transport)
Dispatch an event to specified destination using a transport service. |
Address |
getTransportAddress(java.lang.String name)
Return local address of a transport service with specified name. |
TransportService |
getTransportService(java.lang.String name)
Return a transport service with specified name. |
void |
handleDispatchUnit(DispatchUnit dunit)
Handle the data unit delivered by dispatch service. |
java.lang.Object |
handleRequest(Request req)
Processing a request. |
void |
initDependents()
Initialize dependent services here. |
void |
run()
|
Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleEvent, handleEvent, hasInited, init, 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, hasInited, init, setName, setServiceManager, start, stop |
Methods inherited from interface solar.api.EventHandler |
handleEvent |
Field Detail |
protected static org.apache.log4j.Logger _log
protected ServiceManager _manager
protected java.util.Hashtable _transports
protected Queue _queue
Constructor Detail |
public SolarDispatchService()
Method Detail |
public void initDependents() throws ServiceException
Service
initDependents
in interface Service
initDependents
in class BaseService
ServiceException
public void handleDispatchUnit(DispatchUnit dunit) throws java.lang.Exception
Service
handleDispatchUnit
in interface Service
handleDispatchUnit
in class BaseService
java.lang.Exception
public java.lang.Object handleRequest(Request req) throws java.lang.Exception
RequestHandler
handleRequest
in interface RequestHandler
handleRequest
in class BaseService
java.lang.Exception
public TransportService getTransportService(java.lang.String name)
DispatchService
getTransportService
in interface DispatchService
public Address getTransportAddress(java.lang.String name)
DispatchService
getTransportAddress
in interface DispatchService
public void dispatchEvent(Event evt, Address dest, java.lang.String service, java.lang.String transport) throws java.lang.Exception
DispatchService
dispatchEvent
in interface DispatchService
java.lang.Exception
public void run()
run
in interface java.lang.Runnable
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |