|
JXTA | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.jxta.impl.content.AbstractContentTransfer
net.jxta.impl.content.defprovider.DefaultContentTransfer
public class DefaultContentTransfer
| Field Summary |
|---|
| Fields inherited from class net.jxta.impl.content.AbstractContentTransfer |
|---|
DEFAULT_DISCOVERY_THRESHOLD, DEFAULT_ENABLE_LOCAL, DEFAULT_ENABLE_REMOTE, DEFAULT_MAX_STALLS, DEFAULT_SOURCE_LOCATION_INTERVAL |
| Constructor Summary | |
|---|---|
DefaultContentTransfer(DefaultContentProvider origin,
ScheduledExecutorService schedExecutor,
PeerGroup group,
ContentID contentID)
Constructor for use with ContentIDs. |
|
DefaultContentTransfer(DefaultContentProvider origin,
ScheduledExecutorService schedExecutor,
PeerGroup group,
ContentShareAdvertisement contentAdv)
Constructor for use with ContentShareAdvertisements. |
|
| Method Summary | |
|---|---|
void |
cancel()
Cancels all remote data source location and Content transfer activity, if still in progress. |
protected int |
getEnoughLocationCount()
Gets the number of source location advertisements that must be obtained before attempting to start a transfer. |
protected int |
getManyLocationCount()
Gets the number of source location advertisements that must be obtained before source location will be shut down. |
protected boolean |
isAdvertisementOfUse(ContentShareAdvertisement adv)
Determines whether or not the advertisement provided is of use to the provider. |
void |
pipeMsgEvent(PipeMsgEvent pme)
Processes incoming Content service requests. |
void |
processMessage(Message msg)
Processes incoming Content service responses. |
protected ContentTransferState |
transferAttempt(File dest,
List<ContentShareAdvertisement> sources,
List<ContentShareAdvertisement> newSources)
Attempt to transfer the content from the allSources provided, using the specified destination file for data storage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultContentTransfer(DefaultContentProvider origin,
ScheduledExecutorService schedExecutor,
PeerGroup group,
ContentShareAdvertisement contentAdv)
origin - content provider which created and manager this
transferschedExecutor - executor to use when running tasksgroup - parent peer groupcontentAdv - content that we want to retrieve
public DefaultContentTransfer(DefaultContentProvider origin,
ScheduledExecutorService schedExecutor,
PeerGroup group,
ContentID contentID)
origin - content provider which created and manager this
transferschedExecutor - executor to use when running tasksgroup - parent peer groupcontentID - ID of the content that we want to retrieve| Method Detail |
|---|
protected int getEnoughLocationCount()
getEnoughLocationCount in class AbstractContentTransferprotected int getManyLocationCount()
getManyLocationCount in class AbstractContentTransferprotected boolean isAdvertisementOfUse(ContentShareAdvertisement adv)
isAdvertisementOfUse in class AbstractContentTransferadv - advertisement to test
protected ContentTransferState transferAttempt(File dest,
List<ContentShareAdvertisement> sources,
List<ContentShareAdvertisement> newSources)
throws TransferException
transferAttempt in class AbstractContentTransferdest - destination file which should be used to store the
content datasources - all currently known sourcesnewSources - all sources which have been discovered since the
last transfer attempt
TransferException - when a problem occurs during transfer attemptpublic void cancel()
cancel in interface ContentTransfercancel in class AbstractContentTransferpublic void pipeMsgEvent(PipeMsgEvent pme)
pipeMsgEvent in interface PipeMsgListenerpme - pipe message event receivedpublic void processMessage(Message msg)
msg - message received
|
JXSE | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||