本文整理了Java中org.apache.catalina.Context.addPropertyChangeListener()
方法的一些代码示例,展示了Context.addPropertyChangeListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Context.addPropertyChangeListener()
方法的具体详情如下:
包路径:org.apache.catalina.Context
类名称:Context
方法名:addPropertyChangeListener
暂无
代码示例来源:origin: apache/geode
/**
* This method was taken from StandardManager to set the default maxInactiveInterval based on the
* container (to 30 minutes).
* <p>
* Set the Container with which this Manager has been associated. If it is a Context (the usual
* case), listen for changes to the session timeout property.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
((Context) this.container).removePropertyChangeListener(this);
}
// Default processing provided by our superclass
super.setContainer(container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
// Overwrite the max inactive interval with the context's session timeout.
setMaxInactiveInterval(((Context) this.container).getSessionTimeout() * 60);
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: magro/memcached-session-manager
/**
* {@inheritDoc}
*/
@Override
public void setContainer( final Container container ) {
// De-register from the old Container (if any)
if ( this.container != null && this.container instanceof Context ) {
( (Context) this.container ).removePropertyChangeListener( this );
}
// Default processing provided by our superclass
super.setContainer( container );
// Register with the new Container (if any)
if ( this.container != null && this.container instanceof Context ) {
setMaxInactiveInterval( ( (Context) this.container ).getSessionTimeout() * 60 );
( (Context) this.container ).addPropertyChangeListener( this );
}
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void setContext(Context context) {
// De-register from the old Context (if any)
if (this.context != null) {
this.context.removePropertyChangeListener(this);
}
Context oldContext = this.context;
this.context = context;
support.firePropertyChange("context", oldContext, this.context);
// TODO - delete the line below in Tomcat 9 onwards
support.firePropertyChange("container", oldContext, this.context);
// Register with the new Context (if any)
if (this.context != null) {
setMaxInactiveInterval(this.context.getSessionTimeout() * 60);
this.context.addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Set the Container with which this Manager has been associated. If
* it is a Context (the usual case), listen for changes to the session
* timeout property.
*
* @param container The associated Container
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Default processing provided by our superclass
super.setContainer(container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.jboss.web/jbossweb
/**
* Set the Container with which this Manager has been associated. If it is a
* Context (the usual case), listen for changes to the session timeout
* property.
*
* @param container
* The associated Container
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Default processing provided by our superclass
super.setContainer(container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: tomcat/catalina
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Set the Container with which this Manager is associated.
*
* @param container The newly associated Container
*/
@Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.glassfish.main.web/web-core
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if (this.container instanceof Context) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Set the Container with which this Manager is associated.
*
* @param container The newly associated Container
*/
@Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
/**
* Set the Container with which this Manager is associated.
*
* @param container The newly associated Container
*/
@Override
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
/**
* Set the Container with which this Logger has been associated.
*
* @param container The associated Container
*/
@Override
public void setContainer(Container container) {
// Deregister from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Process this property change
Container oldContainer = this.container;
this.container = container;
support.firePropertyChange("container", oldContainer, this.container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setReloadable( ((Context) this.container).getReloadable() );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.osivia.portal.core/osivia-portal-jbossas-jbossweb-lib
/* */ public void setContainer(Container container)
/* */ {
/* 165 */ if ((this.container != null) && ((this.container instanceof Context))) {
/* 166 */ ((Context)this.container).removePropertyChangeListener(this);
/* */ }
/* */
/* 169 */ super.setContainer(container);
/* */
/* 172 */ if ((this.container != null) && ((this.container instanceof Context))) {
/* 173 */ setMaxInactiveInterval(((Context)this.container).getSessionTimeout() * 60);
/* */
/* 175 */ ((Context)this.container).addPropertyChangeListener(this);
/* */ }
/* */ }
/* */
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-catalina
/**
* @param container the container to set
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
this.container = container;
if(container instanceof SipContext)
sipManagerDelegate.setContainer((SipContext)container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: org.mobicents.servlet.sip.containers/sip-servlets-as7
/**
* @param container the container to set
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
this.container = container;
if(container instanceof SipContext)
sipManagerDelegate.setContainer((SipContext)container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: tomcat/catalina
/**
* Set the Container with which this Manager has been associated. If
* it is a Context (the usual case), listen for changes to the session
* timeout property.
*
* @param container The associated Container
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Default processing provided by our superclass
super.setContainer(container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
代码示例来源:origin: jboss.web/jbossweb
/**
* Set the Container with which this Manager has been associated. If
* it is a Context (the usual case), listen for changes to the session
* timeout property.
*
* @param container The associated Container
*/
public void setContainer(Container container) {
// De-register from the old Container (if any)
if ((this.container != null) && (this.container instanceof Context))
((Context) this.container).removePropertyChangeListener(this);
// Default processing provided by our superclass
super.setContainer(container);
// Register with the new Container (if any)
if ((this.container != null) && (this.container instanceof Context)) {
setMaxInactiveInterval
( ((Context) this.container).getSessionTimeout()*60 );
((Context) this.container).addPropertyChangeListener(this);
}
}
内容来源于网络,如有侵权,请联系作者删除!