本文整理汇总了Java中org.apache.catalina.ContainerListener类的典型用法代码示例。如果您正苦于以下问题:Java ContainerListener类的具体用法?Java ContainerListener怎么用?Java ContainerListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ContainerListener类属于org.apache.catalina包,在下文中一共展示了ContainerListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: findContainerListeners
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Return the set of container listeners associated with this Container.
* If this Container has no registered container listeners, a zero-length
* array is returned.
*/
@Override
public ContainerListener[] findContainerListeners() {
ContainerListener[] results =
new ContainerListener[0];
return listeners.toArray(results);
}
示例2: fireContainerEvent
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Notify all container event listeners that a particular event has
* occurred for this Container. The default implementation performs
* this notification synchronously using the calling thread.
*
* @param type Event type
* @param data Event data
*/
@Override
public void fireContainerEvent(String type, Object data) {
if (listeners.size() < 1)
return;
ContainerEvent event = new ContainerEvent(this, type, data);
// Note for each uses an iterator internally so this is safe
for (ContainerListener listener : listeners) {
listener.containerEvent(event);
}
}
示例3: ListenersInfo
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
public ListenersInfo(Container container,
ContainerListener[] containerListeners,
LifecycleListener[] lifecycleListeners) {
this.container = container;
this.containerListeners = containerListeners;
this.lifecycleListeners = lifecycleListeners;
}
示例4: addContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Add a container event listener to this component.
*
* @param listener The listener to add
*/
public void addContainerListener(ContainerListener listener) {
synchronized (listeners) {
listeners.add(listener);
}
}
示例5: findContainerListeners
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Return the set of container listeners associated with this Container.
* If this Container has no registered container listeners, a zero-length
* array is returned.
*/
public ContainerListener[] findContainerListeners() {
synchronized (listeners) {
ContainerListener[] results =
new ContainerListener[listeners.size()];
return ((ContainerListener[]) listeners.toArray(results));
}
}
示例6: removeContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Remove a container event listener from this component.
*
* @param listener The listener to remove
*/
public void removeContainerListener(ContainerListener listener) {
synchronized (listeners) {
listeners.remove(listener);
}
}
示例7: fireContainerEvent
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Notify all container event listeners that a particular event has
* occurred for this Container. The default implementation performs
* this notification synchronously using the calling thread.
*
* @param type Event type
* @param data Event data
*/
public void fireContainerEvent(String type, Object data) {
if (listeners.size() < 1)
return;
ContainerEvent event = new ContainerEvent(this, type, data);
ContainerListener list[] = new ContainerListener[0];
synchronized (listeners) {
list = (ContainerListener[]) listeners.toArray(list);
}
for (int i = 0; i < list.length; i++)
((ContainerListener) list[i]).containerEvent(event);
}
示例8: findContainerListeners
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Return the set of container listeners associated with this Container.
* If this Container has no registered container listeners, a zero-length
* array is returned.
*/
public ContainerListener[] findContainerListeners() {
synchronized (listeners) {
ContainerListener[] results =
new ContainerListener[listeners.size()];
return ((ContainerListener[]) listeners.toArray(results));
}
}
示例9: fireContainerEvent
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Notify all container event listeners that a particular event has occurred
* for this Container. The default implementation performs this notification
* synchronously using the calling thread.
*
* @param type
* Event type
* @param data
* Event data
*/
@Override
public void fireContainerEvent(String type, Object data) {
if (listeners.size() < 1)
return;
ContainerEvent event = new ContainerEvent(this, type, data);
// Note for each uses an iterator internally so this is safe
for (ContainerListener listener : listeners) {
listener.containerEvent(event);
}
}
示例10: addContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Add a container event listener to this component.
*
* @param listener The listener to add
*/
@Override
public void addContainerListener(ContainerListener listener) {
synchronized (listeners) {
listeners.add(listener);
}
}
示例11: findContainerListeners
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Return the set of container listeners associated with this Container.
* If this Container has no registered container listeners, a zero-length
* array is returned.
*/
@Override
public ContainerListener[] findContainerListeners() {
synchronized (listeners) {
ContainerListener[] results =
new ContainerListener[listeners.size()];
return listeners.toArray(results);
}
}
示例12: removeContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Remove a container event listener from this component.
*
* @param listener The listener to remove
*/
@Override
public void removeContainerListener(ContainerListener listener) {
synchronized (listeners) {
listeners.remove(listener);
}
}
示例13: fireContainerEvent
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
/**
* Notify all container event listeners that a particular event has
* occurred for this Container. The default implementation performs
* this notification synchronously using the calling thread.
*
* @param type Event type
* @param data Event data
*/
@Override
public void fireContainerEvent(String type, Object data) {
if (listeners.size() < 1)
return;
ContainerEvent event = new ContainerEvent(this, type, data);
ContainerListener list[] = new ContainerListener[0];
synchronized (listeners) {
list = listeners.toArray(list);
}
for (int i = 0; i < list.length; i++)
list[i].containerEvent(event);
}
示例14: addContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public final T addContainerListener(ContainerListener listener) {
LOGGER.log(Level.FINE, "addContainerListener({0})", listener.getClass().getName());
container.addContainerListener(listener);
return (T) this;
}
示例15: addContainerListener
import org.apache.catalina.ContainerListener; //导入依赖的package包/类
@Override
public void addContainerListener(ContainerListener listener) { /* NO-OP */ }