|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.jxta.share.CMS
This class implements the Content Management Service. The class is started with one of the startApp methods. The command pipe and persistent directory is passed to the startApp method, else default values are used. A remote client interacts with the service by finding the request PipeAdvertisement and sending it LIST and GET requests. The requests are handled by the ListMessageProcessor and GetMessageProcessor.
Field Summary | |
static java.lang.String |
ADVERTISEMENT_COUNT
|
static java.lang.String |
CHUNK_DATA
|
static java.lang.String |
CHUNK_OFFSET
|
static java.lang.String |
CHUNK_SIZE
|
static java.lang.String |
CONTENT_ADVERTISEMENT
|
static java.lang.String |
CONTENT_ID
|
static java.lang.String |
CONTENT_LENGTH
|
static java.lang.String |
DEFAULT_DIR
|
static net.jxta.document.MimeMediaType |
encodeAs
|
static java.lang.String |
GET_REQUEST
|
static java.lang.String |
GET_RESULT
|
static java.lang.String |
LIST_REQUEST
|
static java.lang.String |
LIST_RESULT
|
static java.lang.String |
MESSAGE_TYPE
|
static java.lang.String |
PIPE_ADV_FILENAME
|
static java.lang.String |
PIPE_ADV_NAME
|
static java.lang.String |
PIPE_ADVERTISEMENT
|
static int |
pipeTimeout
|
static java.lang.String |
QUERY_SUBSTRING
|
static java.lang.String |
REQUEST_ID
|
Constructor Summary | |
CMS()
|
Method Summary | |
net.jxta.document.Advertisement |
getAdvertisement()
Returns the advertisment for the service. |
net.jxta.share.ContentManager |
getContentManager()
Returns the Content Manager for this service. |
net.jxta.service.Service |
getInterface()
Service objects are not manipulated directly to protect usage of the service. |
net.jxta.pipe.Pipe |
getPipe()
Returns the pipe service for this group. |
net.jxta.protocol.PipeAdvertisement |
getRequestPipeAdvertisement()
Returns the request pipe advertisment for this service. |
void |
init(net.jxta.peergroup.PeerGroup group,
net.jxta.document.Advertisement adv)
Initialize the application passing it ist peer group handle. |
protected static java.lang.String |
popString(net.jxta.endpoint.Message message,
java.lang.String tag)
Returns the String contained in the given tag in the given Message. |
int |
startApp(java.io.File dir)
Start the service with the given parameters. |
int |
startApp(java.lang.String[] arg)
Start the service with the given parameters. |
void |
stopApp()
Stops the service |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String DEFAULT_DIR
public static final java.lang.String PIPE_ADV_FILENAME
public static final java.lang.String PIPE_ADV_NAME
public static final java.lang.String LIST_REQUEST
public static final java.lang.String LIST_RESULT
public static final java.lang.String GET_REQUEST
public static final java.lang.String GET_RESULT
public static final java.lang.String MESSAGE_TYPE
public static final java.lang.String REQUEST_ID
public static final java.lang.String CONTENT_ID
public static final java.lang.String PIPE_ADVERTISEMENT
public static final java.lang.String CONTENT_ADVERTISEMENT
public static final java.lang.String CONTENT_LENGTH
public static final java.lang.String ADVERTISEMENT_COUNT
public static final java.lang.String CHUNK_OFFSET
public static final java.lang.String CHUNK_SIZE
public static final java.lang.String CHUNK_DATA
public static final java.lang.String QUERY_SUBSTRING
public static int pipeTimeout
public static net.jxta.document.MimeMediaType encodeAs
Constructor Detail |
public CMS()
Method Detail |
public void init(net.jxta.peergroup.PeerGroup group, net.jxta.document.Advertisement adv) throws net.jxta.exception.PeerGroupException
group
- PeerGroup this application is started frompublic int startApp(java.lang.String[] arg)
arg
- String[] of parameterspublic int startApp(java.io.File dir)
rPipeAdv
- PipeAdvertisement of the request pipecmsDir
- File pointing to the persistence directorypublic void stopApp()
public net.jxta.service.Service getInterface()
public net.jxta.document.Advertisement getAdvertisement()
public net.jxta.pipe.Pipe getPipe()
public net.jxta.protocol.PipeAdvertisement getRequestPipeAdvertisement()
public net.jxta.share.ContentManager getContentManager()
protected static java.lang.String popString(net.jxta.endpoint.Message message, java.lang.String tag) throws java.io.IOException
|
JXTA | ||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |