solar.service.fap
Class FapClientService

java.lang.Object
  |
  +--solar.service.BaseService
        |
        +--solar.service.fap.FapClientService
All Implemented Interfaces:
EventHandler, FapService, RequestHandler, Service
Direct Known Subclasses:
SolarFapService

public class FapClientService
extends BaseService
implements FapService

Implementation of Filter-and-Pipe (FAP) service.

Version:
$Id: FapClientService.java,v 1.13 2003/10/05 18:50:57 glchen Exp $
Author:
Guanling Chen

Field Summary
protected  java.util.List _clients
           
protected  DispatchService _dispatch
           
protected  org.apache.log4j.Logger _log
           
protected  java.util.Hashtable _pipes
           
protected  RpcService _rpc
           
protected  TransportService _transport
           
 
Fields inherited from class solar.service.BaseService
_inited, _manager, _name
 
Constructor Summary
FapClientService()
           
 
Method Summary
 DispatchService getDispatchService()
          Return the dispatch service.
 Pipe getPipe(Id pid)
          Return a pipe given its ID.
 RpcService getRpcService(Id pid)
          Return the RPC service used by a particular pipe.
 TransportService getTransportService(Id pid)
          Return the transport service used by a particular pipe.
 void handleEvent(Event evt)
          Processing an event.
 java.lang.Object handleRequest(Request req)
          Processing a request.
 void initDependents()
          Initialize dependent services here.
protected  Id makePipeId()
           
 Id pconnect(Id pid, int type, Address raddr, Id rpid, OutputPort outport, DataSink sink, InputPort inport, boolean client)
          Setup a pipe that has a remote source.
 Id pconnect(Id pid, int type, DataSource source, OutputPort outport, Address raddr, Id rpid, InputPort inport, boolean client)
          Setup a pipe that has a remote sink.
 Id pconnect(Id pid, int type, DataSource source, OutputPort outport, DataSink sink, InputPort inport)
          Setup a local pipe and return the pipe ID.
protected  void registerPipe(Id pid, Pipe pipe)
           
protected  Id registerPipeId(Id pid)
           
 
Methods inherited from class solar.service.BaseService
assertInited, getDependentService, getName, getServiceManager, handleDispatchUnit, 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, handleDispatchUnit, hasInited, init, setName, setServiceManager, start, stop
 

Field Detail

_log

protected org.apache.log4j.Logger _log

_dispatch

protected DispatchService _dispatch

_rpc

protected RpcService _rpc

_transport

protected TransportService _transport

_pipes

protected java.util.Hashtable _pipes

_clients

protected java.util.List _clients
Constructor Detail

FapClientService

public FapClientService()
Method Detail

initDependents

public void initDependents()
                    throws ServiceException
Description copied from interface: Service
Initialize dependent services here.

Specified by:
initDependents in interface Service
Overrides:
initDependents in class BaseService
ServiceException

handleEvent

public void handleEvent(Event evt)
                 throws java.lang.Exception
Description copied from interface: EventHandler
Processing an event.

Specified by:
handleEvent in interface EventHandler
Overrides:
handleEvent in class BaseService
java.lang.Exception

handleRequest

public java.lang.Object handleRequest(Request req)
                               throws java.lang.Exception
Description copied from interface: RequestHandler
Processing a request.

Specified by:
handleRequest in interface RequestHandler
Overrides:
handleRequest in class BaseService
java.lang.Exception

pconnect

public Id pconnect(Id pid,
                   int type,
                   DataSource source,
                   OutputPort outport,
                   DataSink sink,
                   InputPort inport)
            throws FapException
Description copied from interface: FapService
Setup a local pipe and return the pipe ID. The parameter pid can be null and the method will return a generated ID for the pipe.

Specified by:
pconnect in interface FapService
FapException

pconnect

public Id pconnect(Id pid,
                   int type,
                   Address raddr,
                   Id rpid,
                   OutputPort outport,
                   DataSink sink,
                   InputPort inport,
                   boolean client)
            throws FapException
Description copied from interface: FapService
Setup a pipe that has a remote source. The parameter pid can be null and the method will return a generated ID for the pipe.

Specified by:
pconnect in interface FapService
FapException

pconnect

public Id pconnect(Id pid,
                   int type,
                   DataSource source,
                   OutputPort outport,
                   Address raddr,
                   Id rpid,
                   InputPort inport,
                   boolean client)
            throws FapException
Description copied from interface: FapService
Setup a pipe that has a remote sink. The parameter pid can be null and the method will return a generated ID for the pipe.

Specified by:
pconnect in interface FapService
FapException

getPipe

public Pipe getPipe(Id pid)
Description copied from interface: FapService
Return a pipe given its ID.

Specified by:
getPipe in interface FapService

getDispatchService

public DispatchService getDispatchService()
Description copied from interface: FapService
Return the dispatch service.

Specified by:
getDispatchService in interface FapService

getRpcService

public RpcService getRpcService(Id pid)
Description copied from interface: FapService
Return the RPC service used by a particular pipe.

Specified by:
getRpcService in interface FapService

getTransportService

public TransportService getTransportService(Id pid)
Description copied from interface: FapService
Return the transport service used by a particular pipe.

Specified by:
getTransportService in interface FapService

registerPipe

protected void registerPipe(Id pid,
                            Pipe pipe)

registerPipeId

protected Id registerPipeId(Id pid)
                     throws FapException
FapException

makePipeId

protected Id makePipeId()