|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--solar.service.BaseService
|
+--solar.service.pubsub.ClientPubSubService
The PACK service that runs at the client side.
| Field Summary | |
protected DispatchService |
_dispatch
|
protected EndPointManager |
_epman
|
protected static org.apache.log4j.Logger |
_log
Logging facility. |
protected java.lang.String |
_pubsubName
|
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 |
| Constructor Summary | |
ClientPubSubService()
|
|
| Method Summary | |
void |
addPublisher(Id pubId,
Publisher publisher)
Register a publisher with the service. |
void |
addSubscriber(Id subId,
Subscriber subscriber)
Register a subscriber with the service. |
private void |
assertNotRegistered(Id id)
|
private void |
assertRegistered(Id id)
|
private java.lang.Object |
callRpc(Request request)
|
void |
handleEvent(Event evt)
Processing an event. |
java.lang.Object |
handleRequest(Request request)
Processing a request. |
void |
init()
Initiate the service, do not try to init dependent services here. |
void |
initDependents()
Initialize dependent services here. |
private Guid |
makeGuid(Id id)
|
void |
publish(Id pubId,
Event evt)
Publish an event to all subscribers. |
void |
subscribe(Id pubId,
Id subId,
java.lang.Object extra)
Make a subscription to a publisher. |
| Methods inherited from class solar.service.BaseService |
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, handleEvent, 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 |
| Field Detail |
protected static org.apache.log4j.Logger _log
protected Address _server
protected java.lang.String _pubsubName
protected java.lang.String _transportName
protected Address _transportAddress
protected RpcService _rpc
protected DispatchService _dispatch
protected EndPointManager _epman
| Constructor Detail |
public ClientPubSubService()
| 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 java.lang.Object handleRequest(Request request)
throws java.lang.Exception
RequestHandler
handleRequest in interface RequestHandlerhandleRequest in class BaseServicejava.lang.Exception
public void handleEvent(Event evt)
throws java.lang.Exception
EventHandler
handleEvent in interface EventHandlerhandleEvent in class BaseServicejava.lang.Exception
public void addPublisher(Id pubId,
Publisher publisher)
throws PubSubException
PubSubService
addPublisher in interface PubSubServicePubSubException
public void addSubscriber(Id subId,
Subscriber subscriber)
throws PubSubException
PubSubService
addSubscriber in interface PubSubServicePubSubException
public void subscribe(Id pubId,
Id subId,
java.lang.Object extra)
throws PubSubException
PubSubService
subscribe in interface PubSubServicePubSubException
public void publish(Id pubId,
Event evt)
throws PubSubException
PubSubService
publish in interface PubSubServicePubSubExceptionprivate Guid makeGuid(Id id)
private void assertRegistered(Id id)
throws PubSubException
PubSubException
private void assertNotRegistered(Id id)
throws PubSubException
PubSubException
private java.lang.Object callRpc(Request request)
throws RpcException
RpcException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||