本文整理汇总了Java中com.twilio.chat.Member类的典型用法代码示例。如果您正苦于以下问题:Java Member类的具体用法?Java Member怎么用?Java Member使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Member类属于com.twilio.chat包,在下文中一共展示了Member类的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Member
import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableMap Member(Member member) {
WritableMap map = Arguments.createMap();
map.putMap("userInfo", UserInfo(member.getUserInfo()));
if (member.getLastConsumedMessageIndex() == null) {
map.putNull("lastConsumedMessageIndex");
}
else {
map.putInt("lastConsumedMessageIndex", member.getLastConsumedMessageIndex().intValue());
}
if (member.getLastConsumptionTimestamp() == null) {
map.putNull("lastConsumptionTimestamp");
}
else {
map.putString("lastConsumptionTimestamp", member.getLastConsumptionTimestamp());
}
return map;
}
示例2: Paginator
import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableMap Paginator(Object paginator, String sid, String type) {
WritableMap map = Arguments.createMap();
WritableMap _paginator = Arguments.createMap();
switch (type) {
case "Channel":
_paginator.putArray("items", Channels(((Paginator<Channel>)paginator).getItems()));
_paginator.putBoolean("hasNextPage", ((Paginator<Channel>)paginator).hasNextPage());
break;
case "ChannelDescriptor":
_paginator.putArray("items", ChannelDescriptors(((Paginator<ChannelDescriptor>)paginator).getItems()));
_paginator.putBoolean("hasNextPage", ((Paginator<ChannelDescriptor>)paginator).hasNextPage());
break;
case "Member":
_paginator.putArray("items", Members(((Paginator<Member>)paginator).getItems()));
_paginator.putBoolean("hasNextPage", ((Paginator<Member>)paginator).hasNextPage());
break;
}
map.putString("sid", sid);
map.putString("type", type);
map.putMap("paginator", _paginator);
return map;
}
示例3: requestNextPageMembers
import com.twilio.chat.Member; //导入依赖的package包/类
public void requestNextPageMembers(String sid, final Promise promise) {
final RCTTwilioChatPaginator tmp = RCTTwilioChatPaginator.getInstance();
Paginator<Member> _paginator = (Paginator<Member>)tmp.paginators.get(sid);
_paginator.requestNextPage(new CallbackListener<Paginator<Member>>() {
@Override
public void onError(ErrorInfo errorInfo) {
super.onError(errorInfo);
promise.reject("request-next-page", "Error occurred while attempting to request the next page. Error Message: " + errorInfo.getErrorText());
}
@Override
public void onSuccess(Paginator<Member> paginator) {
String uuid = RCTTwilioChatPaginator.setPaginator(paginator);
promise.resolve(RCTConvert.Paginator(paginator, uuid, "Member"));
}
});
}
示例4: Members
import com.twilio.chat.Member; //导入依赖的package包/类
public static WritableArray Members(ArrayList<Member> members) {
WritableArray array = Arguments.createArray();
for (Member m : members) {
array.pushMap(Member(m));
}
return array;
}
示例5: onMemberJoin
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberJoin(Member member) {
StatusMessage statusMessage = new JoinedStatusMessage(member.getUserInfo().getIdentity());
this.messageAdapter.addStatusMessage(statusMessage);
}
示例6: onMemberDelete
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberDelete(Member member) {
StatusMessage statusMessage = new LeftStatusMessage(member.getUserInfo().getIdentity());
this.messageAdapter.addStatusMessage(statusMessage);
}
示例7: onMemberChange
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberChange(Member member) {
}
示例8: onTypingStarted
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingStarted(Member member) {
}
示例9: onTypingEnded
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingEnded(Member member) {
}
示例10: onMemberAdded
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberAdded(Member member) {
Log.d(TAG, "Member added: " + member.getIdentity());
}
示例11: onMemberUpdated
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberUpdated(Member member) {
Log.d(TAG, "Member updated: " + member.getIdentity());
}
示例12: onMemberDeleted
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onMemberDeleted(Member member) {
Log.d(TAG, "Member deleted: " + member.getIdentity());
}
示例13: onTypingStarted
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingStarted(Member member) {
Log.d(TAG, "Started Typing: " + member.getIdentity());
}
示例14: onTypingEnded
import com.twilio.chat.Member; //导入依赖的package包/类
@Override
public void onTypingEnded(Member member) {
Log.d(TAG, "Ended Typing: " + member.getIdentity());
}