|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.BaseService | +--solar.service.pack.ClientPackService
The PACK service that runs at the client side.
Nested Class Summary | |
(package private) class |
ClientPackService.Handler
|
(package private) class |
ClientPackService.Sender
|
Field Summary | |
protected DispatchService |
_dispatch
|
protected EndPointManager |
_epman
|
protected InputProtocol |
_inproto
|
protected static org.apache.log4j.Logger |
_log
Logging facility. |
protected MobileHostService |
_mhost
|
protected OutputProtocol |
_outproto
|
protected java.lang.String |
_packName
|
protected RpcService |
_rpc
|
protected Address |
_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 |
Fields inherited from interface solar.service.pack.PackConstants |
PACK_ACK, PACK_BUFFER_LIMIT, PACK_EVENT, PACK_FORWARD, PACK_LASTHOP, PACK_MEMORY_LIMIT, PACK_POLICY, PACK_PUBID, PACK_SUBID, PACK_SUSPEND_LIMIT |
Constructor Summary | |
ClientPackService()
|
Method Summary | |
private void |
assertAttached()
|
void |
attachPublisher(Id pubId,
Publisher publisher)
Attach a PACK publisher to the service. |
void |
attachSubscriber(Id subId,
Subscriber subscriber)
Attach a PACK subscriber to the service. |
private java.lang.Object |
callRpc(Request request)
|
void |
clientAttached(Address address)
Handler when a client is attached to a Planet. |
void |
clientDetached(Address address)
Handler when a client is detached from a Planet. |
void |
detachPublisher(Id pubId)
Detach a PACK publisher from the service. |
void |
detachSubscriber(Id subId)
Detach a PACK subscriber from the service. |
void |
handleEvent(Event evt)
Processing an event. |
void |
handlePackEvent(PackEvent evt)
|
void |
handleSubscribeEvent(SubscribeEvent evt)
|
void |
init()
Initiate the service, do not try to init dependent services here. |
void |
initDependents()
Initialize dependent services here. |
Guid |
makeGuid(Id id)
Return a global unique ID. |
void |
publish(Id pubId,
Event evt)
Publish an event to all subscribers. |
void |
subscribe(Id pubId,
Id subId,
java.lang.Object policy)
Make a subscription to a PACK publisher. |
Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, 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.RequestHandler |
handleRequest |
Field Detail |
protected static org.apache.log4j.Logger _log
protected Address _server
protected java.lang.String _packName
protected java.lang.String _transportName
protected Address _transportAddress
protected RpcService _rpc
protected MobileHostService _mhost
protected DispatchService _dispatch
protected InputProtocol _inproto
protected OutputProtocol _outproto
protected EndPointManager _epman
Constructor Detail |
public ClientPackService()
Method Detail |
public void init() throws ServiceException
Service
init
in interface Service
init
in class BaseService
ServiceException
public void initDependents() throws ServiceException
Service
initDependents
in interface Service
initDependents
in class BaseService
ServiceException
public void handleEvent(Event evt) throws java.lang.Exception
EventHandler
handleEvent
in interface EventHandler
handleEvent
in class BaseService
java.lang.Exception
public void handleSubscribeEvent(SubscribeEvent evt) throws java.lang.Exception
java.lang.Exception
public void handlePackEvent(PackEvent evt) throws java.lang.Exception
java.lang.Exception
public void attachPublisher(Id pubId, Publisher publisher) throws PackException
PackService
attachPublisher
in interface PackService
PackException
public void detachPublisher(Id pubId) throws PackException
PackService
detachPublisher
in interface PackService
PackException
public void attachSubscriber(Id subId, Subscriber subscriber) throws PackException
PackService
attachSubscriber
in interface PackService
PackException
public void detachSubscriber(Id subId) throws PackException
PackService
detachSubscriber
in interface PackService
PackException
public void subscribe(Id pubId, Id subId, java.lang.Object policy) throws PackException
PackService
subscribe
in interface PackService
PackException
public void publish(Id pubId, Event evt) throws PackException
PackService
publish
in interface PackService
PackException
public Guid makeGuid(Id id)
PackService
makeGuid
in interface PackService
private void assertAttached() throws PackException
PackException
private java.lang.Object callRpc(Request request) throws RpcException
RpcException
public void clientAttached(Address address)
MobileHostListener
clientAttached
in interface MobileHostListener
public void clientDetached(Address address)
MobileHostListener
clientDetached
in interface MobileHostListener
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |