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.
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.
Parameter | Description |
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:
|
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.
Parameter | Description |
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:
|
preferred
| An integer that identifies the preferred transfer effects. It can be any one or a combination of the following values:
|
public void deleteSource();
This method does nothing.
Return Value:
No return value.
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:
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:
public MetaObject getTransferData();
Retrieves the data that is associated with the session.
Return Value:
Returns a MetaObject that represents the data offered for transfer.