本文整理汇总了Java中org.apache.catalina.tribes.MembershipListener类的典型用法代码示例。如果您正苦于以下问题:Java MembershipListener类的具体用法?Java MembershipListener怎么用?Java MembershipListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MembershipListener类属于org.apache.catalina.tribes包,在下文中一共展示了MembershipListener类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: memberAdded
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* memberAdded gets invoked by the interceptor below the channel
* and the channel will broadcast it to the membership listeners
* @param member Member - the new member
*/
@Override
public void memberAdded(Member member) {
//notify upwards
for (int i=0; i<membershipListeners.size(); i++ ) {
MembershipListener membershipListener = (MembershipListener)membershipListeners.get(i);
if (membershipListener != null) membershipListener.memberAdded(member);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:GroupChannel.java
示例2: memberDisappeared
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* memberDisappeared gets invoked by the interceptor below the channel
* and the channel will broadcast it to the membership listeners
* @param member Member - the member that left or crashed
*/
@Override
public void memberDisappeared(Member member) {
//notify upwards
for (int i=0; i<membershipListeners.size(); i++ ) {
MembershipListener membershipListener = (MembershipListener)membershipListeners.get(i);
if (membershipListener != null) membershipListener.memberDisappeared(member);
}
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:GroupChannel.java
示例3: McastServiceImpl
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Create a new mcast service impl
* @param member - the local member
* @param sendFrequency - the time (ms) in between pings sent out
* @param expireTime - the time (ms) for a member to expire
* @param port - the mcast port
* @param bind - the bind address (not sure this is used yet)
* @param mcastAddress - the mcast address
* @param service - the callback service
* @param localLoopbackDisabled - disable loopbackMode
* @throws IOException
*/
public McastServiceImpl(
MemberImpl member,
long sendFrequency,
long expireTime,
int port,
InetAddress bind,
InetAddress mcastAddress,
int ttl,
int soTimeout,
MembershipListener service,
MessageListener msgservice,
boolean localLoopbackDisabled)
throws IOException {
this.member = member;
this.address = mcastAddress;
this.port = port;
this.mcastSoTimeout = soTimeout;
this.mcastTTL = ttl;
this.mcastBindAddress = bind;
this.timeToExpiration = expireTime;
this.service = service;
this.msgservice = msgservice;
this.sendFrequency = sendFrequency;
this.localLoopbackDisabled = localLoopbackDisabled;
init();
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:39,代码来源:McastServiceImpl.java
示例4: memberAdded
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* memberAdded gets invoked by the interceptor below the channel and the
* channel will broadcast it to the membership listeners
*
* @param member
* Member - the new member
*/
@Override
public void memberAdded(Member member) {
// notify upwards
for (int i = 0; i < membershipListeners.size(); i++) {
MembershipListener membershipListener = (MembershipListener) membershipListeners.get(i);
if (membershipListener != null)
membershipListener.memberAdded(member);
}
}
开发者ID:how2j,项目名称:lazycat,代码行数:17,代码来源:GroupChannel.java
示例5: memberDisappeared
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* memberDisappeared gets invoked by the interceptor below the channel and
* the channel will broadcast it to the membership listeners
*
* @param member
* Member - the member that left or crashed
*/
@Override
public void memberDisappeared(Member member) {
// notify upwards
for (int i = 0; i < membershipListeners.size(); i++) {
MembershipListener membershipListener = (MembershipListener) membershipListeners.get(i);
if (membershipListener != null)
membershipListener.memberDisappeared(member);
}
}
开发者ID:how2j,项目名称:lazycat,代码行数:17,代码来源:GroupChannel.java
示例6: addMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Adds a membership listener to the channel.<br>
* Membership listeners are uniquely identified using the equals(Object) method
* @param membershipListener MembershipListener
*/
@Override
public void addMembershipListener(MembershipListener membershipListener) {
if (!this.membershipListeners.contains(membershipListener) )
this.membershipListeners.add(membershipListener);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:11,代码来源:GroupChannel.java
示例7: removeMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Removes a membership listener from the channel.<br>
* Membership listeners are uniquely identified using the equals(Object) method
* @param membershipListener MembershipListener
*/
@Override
public void removeMembershipListener(MembershipListener membershipListener) {
membershipListeners.remove(membershipListener);
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:11,代码来源:GroupChannel.java
示例8: McastServiceImpl
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Create a new mcast service impl
*
* @param member
* - the local member
* @param sendFrequency
* - the time (ms) in between pings sent out
* @param expireTime
* - the time (ms) for a member to expire
* @param port
* - the mcast port
* @param bind
* - the bind address (not sure this is used yet)
* @param mcastAddress
* - the mcast address
* @param service
* - the callback service
* @param localLoopbackDisabled
* - disable loopbackMode
* @throws IOException
*/
public McastServiceImpl(MemberImpl member, long sendFrequency, long expireTime, int port, InetAddress bind,
InetAddress mcastAddress, int ttl, int soTimeout, MembershipListener service, MessageListener msgservice,
boolean localLoopbackDisabled) throws IOException {
this.member = member;
this.address = mcastAddress;
this.port = port;
this.mcastSoTimeout = soTimeout;
this.mcastTTL = ttl;
this.mcastBindAddress = bind;
this.timeToExpiration = expireTime;
this.service = service;
this.msgservice = msgservice;
this.sendFrequency = sendFrequency;
this.localLoopbackDisabled = localLoopbackDisabled;
init();
}
开发者ID:how2j,项目名称:lazycat,代码行数:38,代码来源:McastServiceImpl.java
示例9: setMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
public void setMembershipListener(MembershipListener membershipListener) {
// Nothing to do
}
开发者ID:wso2,项目名称:wso2-axis2,代码行数:4,代码来源:WkaMembershipService.java
示例10: setMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Add a membership listener, this version only supports one listener per service,
* so calling this method twice will result in only the second listener being active.
* @param listener The listener
*/
@Override
public void setMembershipListener(MembershipListener listener) {
this.listener = listener;
}
开发者ID:liaokailin,项目名称:tomcat7,代码行数:10,代码来源:McastService.java
示例11: addMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Adds a membership listener to the channel.<br>
* Membership listeners are uniquely identified using the equals(Object)
* method
*
* @param membershipListener
* MembershipListener
*/
@Override
public void addMembershipListener(MembershipListener membershipListener) {
if (!this.membershipListeners.contains(membershipListener))
this.membershipListeners.add(membershipListener);
}
开发者ID:how2j,项目名称:lazycat,代码行数:14,代码来源:GroupChannel.java
示例12: removeMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Removes a membership listener from the channel.<br>
* Membership listeners are uniquely identified using the equals(Object)
* method
*
* @param membershipListener
* MembershipListener
*/
@Override
public void removeMembershipListener(MembershipListener membershipListener) {
membershipListeners.remove(membershipListener);
}
开发者ID:how2j,项目名称:lazycat,代码行数:14,代码来源:GroupChannel.java
示例13: setMembershipListener
import org.apache.catalina.tribes.MembershipListener; //导入依赖的package包/类
/**
* Add a membership listener, this version only supports one listener per
* service, so calling this method twice will result in only the second
* listener being active.
*
* @param listener
* The listener
*/
@Override
public void setMembershipListener(MembershipListener listener) {
this.listener = listener;
}
开发者ID:how2j,项目名称:lazycat,代码行数:13,代码来源:McastService.java
注:本文中的org.apache.catalina.tribes.MembershipListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论