Inherits ProxyManager< T extends android.os.IInterface >, AutoCloseable, and ITerminalChannel.
Public Member Functions | |
boolean | isCapable (@NonNull final String capability) throws RemoteException |
Map | getOptions () throws RemoteException |
boolean | isConnected () throws RemoteException |
void | connect (Map params) throws RemoteException |
ParcelFileDescriptor | getStream () throws RemoteException |
int | read (@NonNull byte[] b, int offset, int length) throws RemoteException |
void | write (@NonNull byte[] b, int offset, int length) throws RemoteException |
void | close () throws RemoteException |
Static Public Member Functions | |
static TerminalChannel | getTerminalChannel (final Context context, final ServiceConnection altServiceConnection, final Map deviceParams) |
static InputStream | getInputStreamFromParceledDescriptor (ParcelFileDescriptor channel) |
static OutputStream | getOutputStreamFromParceledDescriptor (ParcelFileDescriptor channel) |
Static Public Attributes | |
static final String | OPEN_CHANNEL_CAPABILITY = "OPEN_CHANNEL_CAPABILITY" |
static final int | SO_CONNECT_TIMEOUT = 1000 |
Provides low-level access to the communication channels between the payment app and this app. This should be used with extreme caution, much of the functionality for the Commerce Platform will NOT be able to function when using this class for communication.
Definition at line 21 of file TerminalChannel.java.
void close | ( | ) | throws RemoteException |
Closes the connection to the device, performing any relevant cleanup.
android.os.RemoteException | Throws a remote exception with the appropriate information. |
Definition at line 191 of file TerminalChannel.java.
void connect | ( | Map | params | ) | throws RemoteException |
Starts the connection to the device.
params |
android.os.RemoteException | Translates any IOExceptions or similar exceptions to this RemoteException for debugging purposes. |
Definition at line 112 of file TerminalChannel.java.
Map getOptions | ( | ) | throws RemoteException |
Returns the current configuration that is used when connecting to the socket.
Definition at line 75 of file TerminalChannel.java.
ParcelFileDescriptor getStream | ( | ) | throws RemoteException |
Connects to a bi-directional channel to allow more control over the flow of data. This should not be used with the read/write methods.
Definition at line 131 of file TerminalChannel.java.
|
static |
Creates a representation of the proxy to communicate with the Transaction Service. Starts the service binding and initialization process in the background. If called from a background thread, blocks until the service binding and initialization is complete. If called from the main thread, operations should not be performed immediately, instead giving the service time to bind in the background. Attach a ServiceConnection object to receive the proper notifications when the service is bound or if it disconnects unexpectedly. This automatically attempts to recover in the cases where the service disconnects unexpectedly, or if other errors occur that drop the connection, so do not attempt to handle those error cases other than delaying messages until the service is reconnected.
Definition at line 42 of file TerminalChannel.java.
boolean isConnected | ( | ) | throws RemoteException |
Tells whether or not the connection to the payment app is connected and ready.
Definition at line 92 of file TerminalChannel.java.
int read | ( | @NonNull byte [] | b, |
int | offset, | ||
int | length | ||
) | throws RemoteException |
Reads some number of bytes from the input stream and stores them into the buffer array b.
b | byte: the buffer into which the data is read. |
android.os.RemoteException | Translates any IOExceptions or similar exceptions to this RemoteException for debugging purposes. |
Definition at line 152 of file TerminalChannel.java.
void write | ( | @NonNull byte [] | b, |
int | offset, | ||
int | length | ||
) | throws RemoteException |
b | byte: the data. |
offset | int: the start offset in the data. |
length | int: the number of bytes to write. |
android.os.RemoteException | Translates any IOExceptions or similar exceptions to this RemoteException for debugging purposes. |
Definition at line 174 of file TerminalChannel.java.
|
static |
Use this capability query to determine if a channel can be opened at all.
Definition at line 23 of file TerminalChannel.java.
|
static |
The key to use when configuring the timeout duration when connecting.
Definition at line 25 of file TerminalChannel.java.
This document is the confidential property of Verifone, Inc. Any reproduction or distribution of this document, in whole or in part, or the disclosure of any of the information contained herein, without the prior written consent of Verifone, Inc. is prohibited. This document and any supplemental material supplied as part of any review must be returned to Verifone, Inc. upon request. Notice: This document may go through material revisions over time. While the Company will make every effort to keep readers updated as changes occur, care must be taken by the reader to make sure they are reading the latest version. Version numbers appear in the title page and revision history page of this document. All rights reserved. Verifone, the Verifone logo are either trademarks or registered trademarks of Verifone in the United States and/or other countries. All other trademarks or brand names are properties of their respective holders.