Project JXTA

net.jxta.impl.endpoint
Class EndpointServiceInterface

java.lang.Object
  extended by net.jxta.impl.endpoint.EndpointServiceInterface
All Implemented Interfaces:
EndpointListener, EndpointService, Module, Service

public class EndpointServiceInterface
extends Object
implements EndpointService

The EndpointService Service provides a frontend API and enviroment to all endpoint protocols.


Field Summary
(package private)  EndpointServiceImpl theRealThing
           
 
Fields inherited from interface net.jxta.endpoint.EndpointService
HighPrecedence, LowPrecedence, MediumPrecedence
 
Fields inherited from interface net.jxta.platform.Module
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_OK
 
Constructor Summary
EndpointServiceInterface(EndpointServiceImpl s)
          Builds a new interface object.
 
Method Summary
 void addIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name)
          
 boolean addIncomingMessageListener(EndpointListener listener, String serviceName, String serviceParam)
          
 MessengerEventListener addMessageTransport(MessageTransport transpt)
          
 boolean addMessengerEventListener(MessengerEventListener listener, int prio)
          
 void addOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name)
          
 void demux(Message msg)
          
 void finalize()
           
 Iterator getAllMessageTransports()
          
 Messenger getCanonicalMessenger(EndpointAddress addr, Object hint)
          
 PeerGroup getGroup()
          
 Advertisement getImplAdvertisement()
          
 Service getInterface()
           Sort of absurd but this is part of the API we're implementing.
 MessageTransport getMessageTransport(String name)
          
 Messenger getMessenger(EndpointAddress addr)
          Deprecated. legacy support
 Messenger getMessenger(EndpointAddress addr, Object hint)
          
 boolean getMessenger(MessengerEventListener listener, EndpointAddress addr, Object hint)
          Deprecated. legacy support
 Messenger getMessengerImmediate(EndpointAddress addr, Object hint)
          
 void init(PeerGroup pg, ID id, Advertisement ia)
          

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

 boolean ping(EndpointAddress addr)
          
 void processIncomingMessage(Message message, EndpointAddress source, EndpointAddress destination)
          
 void propagate(Message srcMsg, String serviceName, String serviceParam)
          
 MessageFilterListener removeIncomingMessageFilterListener(MessageFilterListener listener, String namespace, String name)
          
 EndpointListener removeIncomingMessageListener(String serviceName, String serviceParam)
          
 boolean removeMessageTransport(MessageTransport transpt)
          
 boolean removeMessengerEventListener(MessengerEventListener listener, int prio)
          
 MessageFilterListener removeOutgoingMessageFilterListener(MessageFilterListener listener, String namespace, String name)
          
 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, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theRealThing

EndpointServiceImpl theRealThing
Constructor Detail

EndpointServiceInterface

public EndpointServiceInterface(EndpointServiceImpl s)
Builds a new interface object.

Method Detail

init

public void init(PeerGroup pg,
                 ID id,
                 Advertisement ia)

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

getImplAdvertisement

public Advertisement getImplAdvertisement()

Specified by:
getImplAdvertisement in interface Service

getInterface

public Service getInterface()
Sort of absurd but this is part of the API we're implementing. We would not do a two-level API just for that.

Specified by:
getInterface in interface Service

getGroup

public PeerGroup getGroup()

Specified by:
getGroup in interface EndpointService

getCanonicalMessenger

public Messenger getCanonicalMessenger(EndpointAddress addr,
                                       Object hint)

Specified by:
getCanonicalMessenger in interface EndpointService

getMessengerImmediate

public Messenger getMessengerImmediate(EndpointAddress addr,
                                       Object hint)

Specified by:
getMessengerImmediate in interface EndpointService

getMessenger

public Messenger getMessenger(EndpointAddress addr,
                              Object hint)

Specified by:
getMessenger in interface EndpointService

propagate

public void propagate(Message srcMsg,
                      String serviceName,
                      String serviceParam)
               throws IOException

Specified by:
propagate in interface EndpointService
Throws:
IOException

demux

public void demux(Message msg)

Specified by:
demux in interface EndpointService

processIncomingMessage

public void processIncomingMessage(Message message,
                                   EndpointAddress source,
                                   EndpointAddress destination)

Specified by:
processIncomingMessage in interface EndpointListener

ping

public boolean ping(EndpointAddress addr)

Specified by:
ping in interface EndpointService

addMessageTransport

public MessengerEventListener addMessageTransport(MessageTransport transpt)

Specified by:
addMessageTransport in interface EndpointService

removeMessageTransport

public boolean removeMessageTransport(MessageTransport transpt)

Specified by:
removeMessageTransport in interface EndpointService

getAllMessageTransports

public Iterator getAllMessageTransports()

Specified by:
getAllMessageTransports in interface EndpointService

getMessageTransport

public MessageTransport getMessageTransport(String name)

Specified by:
getMessageTransport in interface EndpointService

addIncomingMessageListener

public boolean addIncomingMessageListener(EndpointListener listener,
                                          String serviceName,
                                          String serviceParam)

Specified by:
addIncomingMessageListener in interface EndpointService

addIncomingMessageFilterListener

public void addIncomingMessageFilterListener(MessageFilterListener listener,
                                             String namespace,
                                             String name)

Specified by:
addIncomingMessageFilterListener in interface EndpointService

addOutgoingMessageFilterListener

public void addOutgoingMessageFilterListener(MessageFilterListener listener,
                                             String namespace,
                                             String name)

Specified by:
addOutgoingMessageFilterListener in interface EndpointService

removeIncomingMessageFilterListener

public MessageFilterListener removeIncomingMessageFilterListener(MessageFilterListener listener,
                                                                 String namespace,
                                                                 String name)

Specified by:
removeIncomingMessageFilterListener in interface EndpointService

removeOutgoingMessageFilterListener

public MessageFilterListener removeOutgoingMessageFilterListener(MessageFilterListener listener,
                                                                 String namespace,
                                                                 String name)

Specified by:
removeOutgoingMessageFilterListener in interface EndpointService

removeIncomingMessageListener

public EndpointListener removeIncomingMessageListener(String serviceName,
                                                      String serviceParam)

Specified by:
removeIncomingMessageListener in interface EndpointService

addMessengerEventListener

public boolean addMessengerEventListener(MessengerEventListener listener,
                                         int prio)

Specified by:
addMessengerEventListener in interface EndpointService

removeMessengerEventListener

public boolean removeMessengerEventListener(MessengerEventListener listener,
                                            int prio)

Specified by:
removeMessengerEventListener in interface EndpointService

finalize

public void finalize()
Overrides:
finalize in class Object

getMessenger

public boolean getMessenger(MessengerEventListener listener,
                            EndpointAddress addr,
                            Object hint)
Deprecated. legacy support

Specified by:
getMessenger in interface EndpointService

getMessenger

public Messenger getMessenger(EndpointAddress addr)
Deprecated. legacy support

Specified by:
getMessenger in interface EndpointService

JXTA J2SE