public class RespokeEndpoint
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RespokeEndpoint.Listener
A listener interface to notify the receiver of events occurring with the endpoint
|
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<RespokeConnection> |
connections |
java.lang.Object |
presence |
Constructor and Description |
---|
RespokeEndpoint(RespokeSignalingChannel channel,
java.lang.String newEndpointID,
RespokeClient client)
The constructor for this class
|
Modifier and Type | Method and Description |
---|---|
void |
didReceiveMessage(java.lang.String message,
java.util.Date timestamp)
Process a received message.
|
void |
didSendMessage(java.lang.String message,
java.util.Date timestamp)
Process a sent message.
|
RespokeDirectConnection |
directConnection()
Get the active direct connection with this endpoint (if any)
|
RespokeConnection |
getConnection(java.lang.String connectionID,
boolean skipCreate)
Returns a connection with the specified ID, and optionally creates one if it does not exist
|
java.util.ArrayList<RespokeConnection> |
getConnections()
Get an array of connections associated with this endpoint
|
java.lang.String |
getEndpointID()
Get the endpoint's ID
|
void |
resolvePresence()
Find the presence out of all known connections with the highest priority (most availability)
and set it as the endpoint's resolved presence.
|
void |
sendMessage(java.lang.String message,
boolean push,
boolean ccSelf,
Respoke.TaskCompletionListener completionListener)
Send a message to the endpoint through the infrastructure.
|
void |
setDirectConnection(RespokeDirectConnection newDirectConnection)
Associate a direct connection object with this endpoint.
|
void |
setListener(RespokeEndpoint.Listener listener)
Set a receiver for the Listener interface
|
RespokeCall |
startCall(RespokeCall.Listener callListener,
android.content.Context context,
android.opengl.GLSurfaceView glView,
boolean audioOnly)
Create a new call with audio and optionally video.
|
RespokeDirectConnection |
startDirectConnection()
Create a new DirectConnection.
|
public java.util.ArrayList<RespokeConnection> connections
public java.lang.Object presence
public RespokeEndpoint(RespokeSignalingChannel channel, java.lang.String newEndpointID, RespokeClient client)
channel
- The signaling channel managing communications with this endpointnewEndpointID
- The ID for this endpointnewClient
- The client to which this endpoint instance belongspublic void setListener(RespokeEndpoint.Listener listener)
listener
- The new receiver for events from the Listener interface for this endpoint instancepublic void sendMessage(java.lang.String message, boolean push, boolean ccSelf, Respoke.TaskCompletionListener completionListener)
message
- The message to sendpush
- A flag indicating if a push notification should be sent for this messageccSelf
- A flag indicating if the message should be copied to other devices the client might be logged intocompletionListener
- A listener to receive a notification on the success of the asynchronous operationpublic RespokeCall startCall(RespokeCall.Listener callListener, android.content.Context context, android.opengl.GLSurfaceView glView, boolean audioOnly)
callListener
- A listener to receive notifications of call related eventscontext
- An application context with which to access system resourcesglView
- A GLSurfaceView into which video from the call should be rendered, or null if the call is audio onlyaudioOnly
- Specify true for an audio-only callpublic java.lang.String getEndpointID()
public RespokeConnection getConnection(java.lang.String connectionID, boolean skipCreate)
connectionID
- The ID of the connectionskipCreate
- Whether or not to create a new connection if it is not foundpublic java.util.ArrayList<RespokeConnection> getConnections()
public void didReceiveMessage(java.lang.String message, java.util.Date timestamp)
message
- The body of the messagetimestamp
- The message timestamppublic void didSendMessage(java.lang.String message, java.util.Date timestamp)
message
- The body of the messagetimestamp
- The message timestamppublic void resolvePresence()
public RespokeDirectConnection directConnection()
public void setDirectConnection(RespokeDirectConnection newDirectConnection)
newDirectConnection
- The direct connection to associatepublic RespokeDirectConnection startDirectConnection()