Package com.ms.object
 In this topic

*Constructors

*Methods

 

Packages
  PreviousThis PackageNext
Package com.ms.object   Previous This
Package
Next

 


Class SimpleTransferSession

public class SimpleTransferSession implements TransferSession
{
  // Constructors
  public SimpleTransferSession(MetaObject data, int available);
  public SimpleTransferSession(MetaObject data, int available, int preferred);

  // Methods
  public void deleteSource();
  public int getAvailableEffects();
  public int getPreferredEffects();
  public MetaObject getTransferData();
}

This class is a default implementation of the TransferSession interface. If you do not want to customize the behavior of a TransferSession but you want to source some data, the SimpleTransferSession class might be sufficient for your needs.

Be aware that this class does not support the Transfer.MOVE transfer effect because it requires an implementation of TransferSession.deleteSource (which the SimpleTransferSession class does not provide). To remedy this situation, you could extend the SimpleTransferSession class to gain the TransferSession implementation and then override the deleteSource method.

Constructors

SimpleTransferSession

public SimpleTransferSession(MetaObject data, int available);

Creates a SimpleTransferSession object with a data object and the specified available transfers. The preferred transfers of the SimpleTransferSession object default to the specified available transfers.

ParameterDescription
data The MetaObject that represents the data that is transferred by the transfer session.
available A value that identifies the available transfer effects. It can be any one or a combination of the following values:
NONE, COPY, MOVE, or LINK.

SimpleTransferSession

public SimpleTransferSession(MetaObject data, int available, int preferred);

Creates a SimpleTransferSession data transfer session object with a data object and specified available and preferred transfer effects.

ParameterDescription
data A MetaObject that represents the data that is transferred by the transfer session.
available A value that identifies the available transfer effects. It can be any one or a combination of the following values:
NONE, COPY, MOVE, or LINK.
preferred An integer that identifies the preferred transfer effects. It can be any one or a combination of the following values:
NONE COPY MOVE LINK

Methods

deleteSource

public void deleteSource();

This method does nothing.

Return Value:

No return value.

getAvailableEffects

public int getAvailableEffects();

Retrieves the Transfer effects that are available in the session.

Return Value:

Returns a value that identifies the available transfer effects. It can be any one or a combination of the following values:
NONE, COPY, MOVE, or LINK.

getPreferredEffects

public int getPreferredEffects();

Retrieves the Transfer effects that are preferred by the originator of the session.

Return Value:

Returns a value that identifies the preferred transfer effects. It can be any one or a combination of the following values:
NONE, COPY, MOVE, or LINK.

getTransferData

public MetaObject getTransferData();

Retrieves the data that is associated with the session.

Return Value:

Returns a MetaObject that represents the data offered for transfer.

upnrm.gif