Project JXTA

net.jxta.impl.pipe
Class PipeServiceInterface

java.lang.Object
  extended by net.jxta.impl.pipe.PipeServiceInterface
All Implemented Interfaces:
PipeService, Module, Service

 class PipeServiceInterface
extends Object
implements PipeService

This class implements the NetPipe interface.


Field Summary
(package private)  PipeServiceImpl impl
           
 
Fields inherited from interface net.jxta.pipe.PipeService
PropagateType, UnicastSecureType, UnicastType
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
PipeServiceInterface(PipeServiceImpl theRealThing)
          The only authorized constructor.
 
Method Summary
 InputPipe createInputPipe(PipeAdvertisement adv)
          
 InputPipe createInputPipe(PipeAdvertisement adv, PipeMsgListener listener)
          
 Message createMessage()
          
 OutputPipe createOutputPipe(PipeAdvertisement adv, Enumeration peers, long timeout)
          
 OutputPipe createOutputPipe(PipeAdvertisement pipeAdv, long timeout)
          
 void createOutputPipe(PipeAdvertisement pipeAdv, OutputPipeListener listener)
          
 OutputPipe createOutputPipe(PipeAdvertisement adv, PeerID peerid, long timeout)
          
 void createOutputPipe(PipeAdvertisement adv, PeerID peerid, OutputPipeListener listener)
          
 OutputPipe createOutputPipe(PipeAdvertisement adv, Set peers, long timeout)
          
 void createOutputPipe(PipeAdvertisement adv, Set peers, OutputPipeListener listener)
          
 Advertisement getImplAdvertisement()
          
 Service getInterface()
          

Since THIS is already such an object, it returns itself.

 void init(PeerGroup pg, ID assignedID, Advertisement impl)
          

FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement.

 OutputPipeListener removeOutputPipeListener(String pipeID, OutputPipeListener listener)
          
 int startApp(String[] arg)
          

This is here for temporary class hierarchy reasons.

 void stopApp()
          

This is here for temporary class hierarchy reasons.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

impl

PipeServiceImpl impl
Constructor Detail

PipeServiceInterface

public PipeServiceInterface(PipeServiceImpl theRealThing)
The only authorized constructor.

Method Detail

getInterface

public Service getInterface()

Since THIS is already such an object, it returns itself. FIXME: it is kind of absurd to have this method part of the interface but we do not want to define two levels of Service interface just for that.

Specified by:
getInterface in interface Service
Returns:
ResolverService An interface object that implements this service and nothing more.

getImplAdvertisement

public Advertisement getImplAdvertisement()

Specified by:
getImplAdvertisement in interface Service

init

public void init(PeerGroup pg,
                 ID assignedID,
                 Advertisement impl)

FIXME: This is meaningless for the interface object; it is there only to satisfy the requirements of the interface that we implement. Ultimately, the API should define two levels of interfaces: one for the real service implementation and one for the interface object. Right now it feels a bit heavy to so that since the only different between the two would be init() and may-be getName().

Specified by:
init in interface Module

startApp

public int startApp(String[] arg)

This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called

Specified by:
startApp in interface Module

stopApp

public void stopApp()

This is here for temporary class hierarchy reasons. it is ALWAYS ignored. By definition, the interface object protects the real object's start/stop methods from being called

This request is currently ignored.

Specified by:
stopApp in interface Module

createInputPipe

public InputPipe createInputPipe(PipeAdvertisement adv)
                          throws IOException

Specified by:
createInputPipe in interface PipeService
Throws:
IOException

createInputPipe

public InputPipe createInputPipe(PipeAdvertisement adv,
                                 PipeMsgListener listener)
                          throws IOException

Specified by:
createInputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public OutputPipe createOutputPipe(PipeAdvertisement pipeAdv,
                                   long timeout)
                            throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public OutputPipe createOutputPipe(PipeAdvertisement adv,
                                   PeerID peerid,
                                   long timeout)
                            throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public OutputPipe createOutputPipe(PipeAdvertisement adv,
                                   Enumeration peers,
                                   long timeout)
                            throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public OutputPipe createOutputPipe(PipeAdvertisement adv,
                                   Set peers,
                                   long timeout)
                            throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public void createOutputPipe(PipeAdvertisement pipeAdv,
                             OutputPipeListener listener)
                      throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public void createOutputPipe(PipeAdvertisement adv,
                             PeerID peerid,
                             OutputPipeListener listener)
                      throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createOutputPipe

public void createOutputPipe(PipeAdvertisement adv,
                             Set peers,
                             OutputPipeListener listener)
                      throws IOException

Specified by:
createOutputPipe in interface PipeService
Throws:
IOException

createMessage

public Message createMessage()

Specified by:
createMessage in interface PipeService

removeOutputPipeListener

public OutputPipeListener removeOutputPipeListener(String pipeID,
                                                   OutputPipeListener listener)

Specified by:
removeOutputPipeListener in interface PipeService

JXTA J2SE