|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--solar.service.BaseService | +--solar.service.dan.DanClientService
The client interface for DAN (Data Aggregation Network) service. We enforce that all the pipe setup requests involving a Solar client are always issued from that client. The Planet never issues request to setup a pipe to a Solar client. So we can be sure that the remote end for a requesting pipe is always on the Planet.
Field Summary | |
protected FapService |
_fap
|
private Address |
_laddr
|
protected NodeManager |
_nodeman
|
protected PipeConnector |
_pc
|
private Address |
_planet
|
protected RpcService |
_rpc
|
protected TransportService |
_transport
|
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.dan.DanConstants |
DAN_INPORT, DAN_OUTPORT |
Fields inherited from interface solar.service.fap.FapConstants |
FAP_DATA, FAP_MIXED, FAP_PID, FAP_PULL, FAP_PUSH |
Constructor Summary | |
DanClientService()
|
Method Summary | |
Guid |
advertise(java.lang.String name,
java.lang.Object extra,
Source src)
Advertise a static name with a name object and return an ID. |
Guid |
advertise(java.lang.String graph,
java.lang.String name,
java.lang.Object extra,
Source src)
Advertise a dynamic name with a name object and return an ID. |
private java.lang.Object |
callRpc(Request req)
Invoke a RPC call with specified request. |
void |
connect(int type,
Guid sguid,
java.lang.String outport,
Guid dguid,
java.lang.String inport)
Connect two nodes (at least one local) with a pipe. |
DirectoryService |
getDirectoryService()
Get the directory service used by DAN. |
FapService |
getFapService()
Get the fap service used by DAN. |
Address |
getLocalAddress()
Return the local address of the resident Planet. |
NodeManager |
getNodeManager()
Return the node manager for this DAN service. |
RpcService |
getRpcService()
Get the rpc service used by DAN. |
void |
init()
Initiate the service, do not try to init dependent services here. |
void |
initDependents()
Initialize dependent services here. |
java.util.List |
lookup(java.lang.String query)
Resolve a name query in the name space. |
Guid |
makeGuid()
Create a global unique ID. |
Guid |
subscribe(java.lang.String query,
Application app)
Subscribe to any source whose name matches specified query. |
Guid |
subscribe(java.lang.String graph,
java.lang.String root,
Application app)
Subscribe to a specified operator defined in a graph. |
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 |
private Address _planet
private Address _laddr
protected FapService _fap
protected RpcService _rpc
protected TransportService _transport
protected PipeConnector _pc
protected NodeManager _nodeman
Constructor Detail |
public DanClientService()
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 connect(int type, Guid sguid, java.lang.String outport, Guid dguid, java.lang.String inport) throws DanException
DanService
connect
in interface DanService
DanException
public Address getLocalAddress()
DanService
getLocalAddress
in interface DanService
public FapService getFapService()
DanService
getFapService
in interface DanService
public RpcService getRpcService()
DanService
getRpcService
in interface DanService
public DirectoryService getDirectoryService()
DanService
getDirectoryService
in interface DanService
public NodeManager getNodeManager()
DanService
getNodeManager
in interface DanService
public Guid makeGuid()
DanService
makeGuid
in interface DanService
public java.util.List lookup(java.lang.String query) throws DanException
DanException
public Guid advertise(java.lang.String name, java.lang.Object extra, Source src) throws DanException
DanException
public Guid advertise(java.lang.String graph, java.lang.String name, java.lang.Object extra, Source src) throws DanException
DanException
public Guid subscribe(java.lang.String query, Application app) throws DanException
DanException
public Guid subscribe(java.lang.String graph, java.lang.String root, Application app) throws DanException
DanException
private java.lang.Object callRpc(Request req) throws RpcException
RpcException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |