GNDMS 0.6.0
RESTful verison of GNDMS
|
Inherits de::zib::gndms::logic::model::gorfx::AbstractQuoteCalculator< M >.
Public Member Functions | |
List< Quote > | createQuotes () throws ServerException, IOException, ClientException, URISyntaxException |
boolean | validate () |
Weak order validation. | |
Long | getEstimatedTransferSize () throws ServerException, IOException, ClientException |
PRECONDITION estimateTransferSize must have been called before. | |
Float | getEstimatedBandWidth () |
PRECONDITION estimateBandWidth must have been called before. | |
boolean | uriCheck (String address) |
CredentialProvider | getCredentialProvider () |
void | setScheme (String scheme) |
String | getScheme () |
MyProxyFactoryProvider | getMyProxyFactoryProvider () |
void | setMyProxyFactoryProvider (final MyProxyFactoryProvider myProxyFactoryProvider) |
Protected Member Functions | |
Long | estimateTransferSize () throws ServerException, IOException, ClientException, URISyntaxException |
Float | estimateBandWidth () throws IOException |
Estimates the bandwidth. | |
Quote | calculateOffer () |
PRECONDITION estimateTransferSize and estimateBandWidth or their associated setters must have been called before. | |
void | setEstimatedTransferSize (long estimatedTransferSize) |
Use this method to set the download size manually. | |
void | setEstimatedBandWidth (float estimatedBandWidth) |
Use this method to set the available band-width manually. | |
Private Attributes | |
Long | estimatedTransferSize |
Float | estimatedBandWidth |
String | scheme |
MyProxyFactoryProvider | myProxyFactoryProvider |
User: mjorra, Date: 30.09.2008, Time: 10:51:38
Quote de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.calculateOffer | ( | ) | [protected] |
PRECONDITION estimateTransferSize and estimateBandWidth or their associated setters must have been called before.
{ // may at least take 10 s to cover communication overhead. long ms = NetworkAuxiliariesProvider.calculateTransferTime( estimatedTransferSize, estimatedBandWidth, 10000 ); Quote quote = new Quote( ); quote.setDeadline( FutureTime.atOffset( new Duration( ms ) ) ); quote.setExpectedSize( estimatedTransferSize ); return quote; }
Float de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.getEstimatedBandWidth | ( | ) |
PRECONDITION estimateBandWidth must have been called before.
{
return estimatedBandWidth;
}
Long de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.getEstimatedTransferSize | ( | ) | throws ServerException, IOException, ClientException |
PRECONDITION estimateTransferSize must have been called before.
{
return estimatedTransferSize;
}
void de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.setEstimatedBandWidth | ( | float | estimatedBandWidth | ) | [protected] |
Use this method to set the available band-width manually.
This is the alternative to calling estimateBandWidth.
estimatedBandWidth | -- Guess what. |
{ this.estimatedBandWidth = estimatedBandWidth; }
void de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.setEstimatedTransferSize | ( | long | estimatedTransferSize | ) | [protected] |
Use this method to set the download size manually.
This is the alternativ to calling estimateTransferSize.
estimatedTransferSize | -- what the name implies. |
{ this.estimatedTransferSize = estimatedTransferSize; }
boolean de.zib.gndms.taskflows.filetransfer.server.logic.AbstractTransferQuoteCalculator< M extends FileTransferOrder >.validate | ( | ) |
Weak order validation.
Just checks if source and destination URI are provided and are valid URI's. but NOT if the resources exist.
{ FileTransferOrder order = getOrderBean(); if( order == null ) throw new IllegalStateException( "No order provided" ); return uriCheck( order.getSourceURI() ) && uriCheck( order.getDestinationURI() ); }