|
JXTA | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jxta.impl.proxy.ProxyService
public class ProxyService
Nested Class Summary | |
---|---|
(package private) class |
ProxyService.ClientMessage
|
(package private) class |
ProxyService.PendingPipe
|
(package private) static class |
ProxyService.PipeListenerList
|
Field Summary | |
---|---|
(package private) static String |
ARG_TAG
|
(package private) static String |
ATTRIBUTE_TAG
|
static int |
DEFAULT_LIFETIME
|
static int |
DEFAULT_THRESHOLD
|
(package private) static String |
ERROR_MESSAGE_TAG
|
(package private) static String |
ID_TAG
|
(package private) static String |
NAME_TAG
|
(package private) static String |
PROXYNS
|
static String |
REQUEST_CLOSE
|
static String |
REQUEST_CREATE
|
static String |
REQUEST_JOIN
********************************************************************* Define the proxy request types ******************************************************************** |
static String |
REQUEST_LISTEN
|
static String |
REQUEST_SEARCH
|
static String |
REQUEST_SEND
|
static String |
REQUEST_TAG
********************************************************************* Define the proxy message tags ******************************************************************** |
(package private) static String |
REQUESTID_TAG
|
static String |
RESPONSE_ERROR
|
static String |
RESPONSE_INFO
|
static String |
RESPONSE_MESSAGE
|
static String |
RESPONSE_RESULT
|
static String |
RESPONSE_SUCCESS
********************************************************************* Define the proxy response types ******************************************************************** |
static String |
RESPONSE_TAG
|
(package private) static String |
THRESHOLD_TAG
|
static String |
TYPE_GROUP
|
static String |
TYPE_PEER
********************************************************************* Define the proxy type tags ******************************************************************** |
static String |
TYPE_PIPE
|
(package private) static String |
TYPE_TAG
|
(package private) static String |
VALUE_TAG
|
Fields inherited from interface net.jxta.platform.Module |
---|
START_AGAIN_PROGRESS, START_AGAIN_STALLED, START_DISABLED, START_OK |
Constructor Summary | |
---|---|
ProxyService()
|
Method Summary | |
---|---|
void |
discoveryEvent(DiscoveryEvent event)
|
ModuleImplAdvertisement |
getImplAdvertisement()
Returns the advertisement for this service. |
ProxyService |
getInterface()
Service objects are not manipulated directly to protect usage of the service. |
void |
init(PeerGroup group,
ID assignedID,
Advertisement implAdv)
Initialize the module, passing it its peer group and advertisement. |
protected static void |
logMessage(Message message,
Logger log)
|
void |
outputPipeEvent(OutputPipeEvent event)
Called when a input pipe has been located for a previously registered pipe. |
void |
pipeMsgEvent(PipeMsgEvent event)
Called for each pipe message event that occurs. |
void |
processIncomingMessage(Message message,
EndpointAddress srcAddr,
EndpointAddress dstAddr)
This method is invoked by the EndpointService for each incoming message which is addressed to this listener. |
void |
purged(CacheEntry ce)
|
int |
startApp(String[] args)
Complete any remaining initialization of the module. |
void |
stopApp()
Stop a module. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_THRESHOLD
public static final int DEFAULT_LIFETIME
public static final String REQUEST_TAG
public static final String RESPONSE_TAG
static final String REQUESTID_TAG
static final String TYPE_TAG
static final String NAME_TAG
static final String ID_TAG
static final String ARG_TAG
static final String ATTRIBUTE_TAG
static final String VALUE_TAG
static final String THRESHOLD_TAG
static final String ERROR_MESSAGE_TAG
static final String PROXYNS
public static final String REQUEST_JOIN
public static final String REQUEST_CREATE
public static final String REQUEST_SEARCH
public static final String REQUEST_LISTEN
public static final String REQUEST_CLOSE
public static final String REQUEST_SEND
public static final String RESPONSE_SUCCESS
public static final String RESPONSE_ERROR
public static final String RESPONSE_INFO
public static final String RESPONSE_RESULT
public static final String RESPONSE_MESSAGE
public static final String TYPE_PEER
public static final String TYPE_GROUP
public static final String TYPE_PIPE
Constructor Detail |
---|
public ProxyService()
Method Detail |
---|
public void init(PeerGroup group, ID assignedID, Advertisement implAdv) throws PeerGroupException
init
in interface Module
group
- The PeerGroup from which this Module can obtain services.
If this module is a Service, this is also the PeerGroup of which this
module is a service.assignedID
- Identity of Module within group.
modules can use it as a the root of their namespace to create
names that are unique within the group but predictable by the
same module on another peer. This is normally the ModuleClassID
which is also the name under which the module is known by other
modules. For a group it is the PeerGroupID itself.
The parameters of a service, in the Peer configuration, are indexed
by the assignedID of that service, and a Service must publish its
run-time parameters in the Peer Advertisement under its assigned ID.implAdv
- The implementation advertisement for this
Module. It is permissible to pass null if no implementation
advertisement is available. This may happen if the
implementation was selected by explicit class name rather than
by following an implementation advertisement. Modules are not
required to support that style of loading, but if they do, then
their documentation should mention it.
PeerGroupException
- This module failed to initialize.public int startApp(String[] args)
startApp()
is completed. That is
also the opportunity to supply arbitrary arguments (mostly to
applications).
If this module is a PeerGroup
service, it may be invoked
several times depending on its return value.
startApp
in interface Module
args
- An array of Strings forming the parameters for this
Module.
Module.START_OK
, Module.START_AGAIN_PROGRESS
,
Module.START_AGAIN_STALLED
, which indicates partial or complete
success, or any other value (negative values are
recommended for future compatibility), which indicates failure.public void stopApp()
init()
completes and should not assume that startApp()
has been
called or completed.
The Module cannot be forced to comply, but in the future
we might be able to deny it access to anything after some timeout.
stopApp
in interface Module
public ModuleImplAdvertisement getImplAdvertisement()
getImplAdvertisement
in interface Service
ModuleImplAdvertisement
.public ProxyService getInterface()
getInterface
in interface Service
public void processIncomingMessage(Message message, EndpointAddress srcAddr, EndpointAddress dstAddr)
processIncomingMessage
in interface EndpointListener
message
- Incoming messagesrcAddr
- Endpoint Address of the source of the message.dstAddr
- Endpoint Address of the destination of the message.public void discoveryEvent(DiscoveryEvent event)
public void pipeMsgEvent(PipeMsgEvent event)
pipeMsgEvent
in interface PipeMsgListener
event
- The event being received.public void outputPipeEvent(OutputPipeEvent event)
OutputPipe
which can
be used to communicate with the remote peer.
outputPipeEvent
in interface OutputPipeListener
event
- the eventprotected static void logMessage(Message message, Logger log)
public void purged(CacheEntry ce)
purged
in interface CacheEntryListener
|
JXSE | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |