本文整理了Java中net.jradius.packet.attribute.AttributeList.remove()
方法的一些代码示例,展示了AttributeList.remove()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeList.remove()
方法的具体详情如下:
包路径:net.jradius.packet.attribute.AttributeList
类名称:AttributeList
方法名:remove
[英]Removes attribute(s) by type
[中]按类型删除属性
代码示例来源:origin: net.jradius/jradius-core
/**
* Removes an attribute
* @param attributeType The attribute type to be removed
*/
public void removeAttribute(long attributeType)
{
attributes.remove(attributeType);
}
代码示例来源:origin: net.jradius/jradius-core
/**
* Removes an attribute
* @param attribute The RadiusAttribute to be removed
*/
public void removeAttribute(RadiusAttribute attribute)
{
attributes.remove(attribute);
}
代码示例来源:origin: coova/jradius
/**
* Removes an attribute
* @param attribute The RadiusAttribute to be removed
*/
public void removeAttribute(RadiusAttribute attribute)
{
attributes.remove(attribute);
}
代码示例来源:origin: coova/jradius
/**
* Removes an attribute
* @param attributeType The attribute type to be removed
*/
public void removeAttribute(long attributeType)
{
attributes.remove(attributeType);
}
代码示例来源:origin: net.jradius/jradius-core
/**
* Removes attribute(s) by type
* @param a RadiusAttribute to remove
*/
public void remove(RadiusAttribute a)
{
if (a != null)
remove(a.getFormattedType());
}
代码示例来源:origin: coova/jradius
/**
* Removes attribute(s) by type
* @param a RadiusAttribute to remove
*/
public void remove(RadiusAttribute a)
{
if (a != null)
remove(a.getFormattedType());
}
代码示例来源:origin: net.jradius/jradius-core
/**
* Removes all unknown (not in the configured JRadius Dictionary) attribtues.
*/
public void removeUnknown()
{
List<RadiusAttribute> list = getAttributeList();
for (RadiusAttribute a : list)
{
if (a instanceof UnknownAttribute)
{
remove(a);
}
}
}
代码示例来源:origin: coova/jradius
/**
* Removes all unknown (not in the configured JRadius Dictionary) attribtues.
*/
public void removeUnknown()
{
List<RadiusAttribute> list = getAttributeList();
for (RadiusAttribute a : list)
{
if (a instanceof UnknownAttribute)
{
remove(a);
}
}
}
代码示例来源:origin: net.jradius/jradius-core
@SuppressWarnings("unchecked")
public void _add(RadiusAttribute a, boolean overwrite)
{
Long key = new Long(a.getFormattedType());
Object o = attributeMap.get(key);
attributeOrderList.add(a);
if (o == null || overwrite)
{
remove(key);
attributeMap.put(key, a);
}
else
{
// If we already have this attribute and are not
// overwriting, then we create a list of attributes.
if (o instanceof LinkedList)
{
((LinkedList)o).add(a);
}
else
{
LinkedList l = new LinkedList();
l.add(o);
l.add(a);
attributeMap.put(key, l);
}
}
}
代码示例来源:origin: coova/jradius
@SuppressWarnings("unchecked")
public void _add(RadiusAttribute a, boolean overwrite)
{
Long key = new Long(a.getFormattedType());
Object o = attributeMap.get(key);
attributeOrderList.add(a);
if (o == null || overwrite)
{
remove(key);
attributeMap.put(key, a);
}
else
{
// If we already have this attribute and are not
// overwriting, then we create a list of attributes.
if (o instanceof LinkedList)
{
((LinkedList)o).add(a);
}
else
{
LinkedList l = new LinkedList();
l.add(o);
l.add(a);
attributeMap.put(key, l);
}
}
}
代码示例来源:origin: com.hynnet/jradius-extended
public static void addAccessAcceptAttribtues(JRadiusSession session, AttributeList attrs)
{
String s;
Long i;
if ((s = session.getUsername()) != null)
{
attrs.remove(Attr_UserName.TYPE);
attrs.add(new Attr_UserName(s));
}
if ((i = session.getSessionTimeout()) != null)
{
attrs.remove(Attr_SessionTimeout.TYPE);
attrs.add(new Attr_SessionTimeout(i));
}
if ((i = session.getIdleTimeout()) != null && i.longValue() > 0)
{
attrs.remove(Attr_IdleTimeout.TYPE);
attrs.add(new Attr_IdleTimeout(i));
}
if ((i = session.getInterimInterval()) != null && i.longValue() > 0)
{
attrs.remove(Attr_AcctInterimInterval.TYPE);
attrs.add(new Attr_AcctInterimInterval(i));
}
}
}
代码示例来源:origin: net.jradius/jradius-extended
public static void addAccessAcceptAttribtues(JRadiusSession session, AttributeList attrs)
{
String s;
Long i;
if ((s = session.getUsername()) != null)
{
attrs.remove(Attr_UserName.TYPE);
attrs.add(new Attr_UserName(s));
}
if ((i = session.getSessionTimeout()) != null)
{
attrs.remove(Attr_SessionTimeout.TYPE);
attrs.add(new Attr_SessionTimeout(i));
}
if ((i = session.getIdleTimeout()) != null && i.longValue() > 0)
{
attrs.remove(Attr_IdleTimeout.TYPE);
attrs.add(new Attr_IdleTimeout(i));
}
if ((i = session.getInterimInterval()) != null && i.longValue() > 0)
{
attrs.remove(Attr_AcctInterimInterval.TYPE);
attrs.add(new Attr_AcctInterimInterval(i));
}
}
}
代码示例来源:origin: coova/jradius
public static void addAccessAcceptAttribtues(JRadiusSession session, AttributeList attrs)
{
String s;
Long i;
if ((s = session.getUsername()) != null)
{
attrs.remove(Attr_UserName.TYPE);
attrs.add(new Attr_UserName(s));
}
if ((i = session.getSessionTimeout()) != null)
{
attrs.remove(Attr_SessionTimeout.TYPE);
attrs.add(new Attr_SessionTimeout(i));
}
if ((i = session.getIdleTimeout()) != null && i.longValue() > 0)
{
attrs.remove(Attr_IdleTimeout.TYPE);
attrs.add(new Attr_IdleTimeout(i));
}
if ((i = session.getInterimInterval()) != null && i.longValue() > 0)
{
attrs.remove(Attr_AcctInterimInterval.TYPE);
attrs.add(new Attr_AcctInterimInterval(i));
}
}
}
代码示例来源:origin: coova/jradius
public void ensureSessionState(JRadiusRequest request, int state) throws RadiusException
{
if (!checkSessionState(state))
{
// Remove any Proxy-To-Realm in the control items to prevent the proxy
request.getConfigItems().remove(Attr_ProxyToRealm.TYPE);
throw new RadiusSecurityException("Received unexpected packet for session: " + getSessionKey() + " (" + getSessionState() + " != " + state + ")");
}
}
代码示例来源:origin: com.hynnet/jradius-extended
public void ensureSessionState(JRadiusRequest request, int state) throws RadiusException
{
if (!checkSessionState(state))
{
// Remove any Proxy-To-Realm in the control items to prevent the proxy
request.getConfigItems().remove(Attr_ProxyToRealm.TYPE);
throw new RadiusSecurityException("Received unexpected packet for session: " + getSessionKey() + " (" + getSessionState() + " != " + state + ")");
}
}
代码示例来源:origin: net.jradius/jradius-extended
public void ensureSessionState(JRadiusRequest request, int state) throws RadiusException
{
if (!checkSessionState(state))
{
// Remove any Proxy-To-Realm in the control items to prevent the proxy
request.getConfigItems().remove(Attr_ProxyToRealm.TYPE);
throw new RadiusSecurityException("Received unexpected packet for session: " + getSessionKey() + " (" + getSessionState() + " != " + state + ")");
}
}
代码示例来源:origin: coova/jradius
attrs.remove(Attr_Class.TYPE);
attrs.remove(Attr_State.TYPE);
attrs.remove(Attr_EAPMessage.TYPE);
attrs.remove(Attr_MessageAuthenticator.TYPE);
rep.addAttributes(attrs);
return false;
代码示例来源:origin: net.jradius/jradius-extended
attrs.remove(Attr_Class.TYPE);
attrs.remove(Attr_State.TYPE);
attrs.remove(Attr_EAPMessage.TYPE);
attrs.remove(Attr_MessageAuthenticator.TYPE);
rep.addAttributes(attrs);
return false;
代码示例来源:origin: com.hynnet/jradius-extended
ci.remove(Attr_ProxyToRealm.TYPE);
代码示例来源:origin: coova/jradius
ci.remove(Attr_ProxyToRealm.TYPE);
内容来源于网络,如有侵权,请联系作者删除!