本文整理了Java中net.jradius.packet.attribute.AttributeList.get()
方法的一些代码示例,展示了AttributeList.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeList.get()
方法的具体详情如下:
包路径:net.jradius.packet.attribute.AttributeList
类名称:AttributeList
方法名:get
暂无
代码示例来源:origin: net.jradius/jradius-core
/**
* @param type The attribute type
* @return Returns the attribute, if found
*/
public RadiusAttribute findAttribute(long type)
{
return attributes.get(type);
}
代码示例来源:origin: net.jradius/jradius-core
/**
* @param aName The name of the attribute to find
* @return Returns the RadiusAttribute, null if not found
* @throws UnknownAttributeException
*/
public RadiusAttribute findAttribute(String aName) throws UnknownAttributeException
{
return attributes.get(aName);
}
代码示例来源:origin: coova/jradius
/**
* @param aName The name of the attribute to find
* @return Returns the RadiusAttribute, null if not found
* @throws UnknownAttributeException
*/
public RadiusAttribute findAttribute(String aName) throws UnknownAttributeException
{
return attributes.get(aName);
}
代码示例来源:origin: coova/jradius
/**
* @param type The attribute type
* @return Returns the attribute, if found
*/
public RadiusAttribute findAttribute(long type)
{
return attributes.get(type);
}
代码示例来源:origin: net.jradius/jradius-core
public RadiusAttribute get(long type) { return (RadiusAttribute)get(type, true); }
代码示例来源:origin: net.jradius/jradius-core
public RadiusAttribute get(String name) throws UnknownAttributeException
{
return (RadiusAttribute)get(AttributeFactory.getTypeByName(name), true);
}
代码示例来源:origin: net.jradius/jradius-core
public Object get(String name, boolean single) throws UnknownAttributeException
{
return get(AttributeFactory.getTypeByName(name), single);
}
代码示例来源:origin: coova/jradius
public Object get(String name, boolean single) throws UnknownAttributeException
{
return get(AttributeFactory.getTypeByName(name), single);
}
代码示例来源:origin: coova/jradius
public RadiusAttribute get(String name) throws UnknownAttributeException
{
return (RadiusAttribute)get(AttributeFactory.getTypeByName(name), true);
}
代码示例来源:origin: coova/jradius
public Object getValue(long type)
{
RadiusAttribute attribute = get(type);
if (attribute != null)
{
AttributeValue value = attribute.getValue();
if (value != null)
{
return value.getValueObject();
}
}
return null;
}
代码示例来源:origin: net.jradius/jradius-core
public Object getValue(long type)
{
RadiusAttribute attribute = get(type);
if (attribute != null)
{
AttributeValue value = attribute.getValue();
if (value != null)
{
return value.getValueObject();
}
}
return null;
}
代码示例来源:origin: com.hynnet/jradius-extended
/**
* Gets the session key based on the JRadiusSessionId attribute in the configItems.
* @param request The JRadiusRequest
* @return the session key
* @throws RadiusException
*/
public Serializable getAppSessionKey(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
// If we already have seen this packet (in the chain or
// within the same FreeRADIUS request - multiple calls to JRadius)
// we can grab the JRadius-Session-Id.
RadiusAttribute a = ci.get(Attr_JRadiusSessionId.TYPE);
if (a != null) return a.getValue().getValueObject();
return null;
}
代码示例来源:origin: net.jradius/jradius-extended
/**
* Gets the session key based on the JRadiusSessionId attribute in the configItems.
* @param request The JRadiusRequest
* @return the session key
* @throws RadiusException
*/
public Serializable getAppSessionKey(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
// If we already have seen this packet (in the chain or
// within the same FreeRADIUS request - multiple calls to JRadius)
// we can grab the JRadius-Session-Id.
RadiusAttribute a = ci.get(Attr_JRadiusSessionId.TYPE);
if (a != null) return a.getValue().getValueObject();
return null;
}
代码示例来源:origin: coova/jradius
/**
* Gets the session key based on the JRadiusSessionId attribute in the configItems.
* @param request The JRadiusRequest
* @return the session key
* @throws RadiusException
*/
public Serializable getAppSessionKey(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
// If we already have seen this packet (in the chain or
// within the same FreeRADIUS request - multiple calls to JRadius)
// we can grab the JRadius-Session-Id.
RadiusAttribute a = ci.get(Attr_JRadiusSessionId.TYPE);
if (a != null) return a.getValue().getValueObject();
return null;
}
代码示例来源:origin: net.jradius/jradius-extended
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE);
String key;
if (a != null) key = (String)a.getValue().getValueObject();
else key = Integer.toString((char)request.getRequestPacket().getIdentifier());
JRadiusLogEntry entry = getLogEntry(request, key);
entry.setCode(new Integer(request.getReturnValue()));
return entry;
}
代码示例来源:origin: com.hynnet/jradius-extended
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE);
String key;
if (a != null) key = (String)a.getValue().getValueObject();
else key = Integer.toString((char)request.getRequestPacket().getIdentifier());
JRadiusLogEntry entry = getLogEntry(request, key);
entry.setCode(new Integer(request.getReturnValue()));
return entry;
}
代码示例来源:origin: coova/jradius
public JRadiusLogEntry getLogEntry(JRadiusRequest request) throws RadiusException
{
AttributeList ci = request.getConfigItems();
RadiusAttribute a = ci.get(Attr_JRadiusRequestId.TYPE);
String key;
if (a != null) key = (String)a.getValue().getValueObject();
else key = Integer.toString((char)request.getRequestPacket().getIdentifier());
JRadiusLogEntry entry = getLogEntry(request, key);
entry.setCode(new Integer(request.getReturnValue()));
return entry;
}
代码示例来源:origin: coova/jradius
/**
* @throws NoSuchAlgorithmException
* @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket)
*/
public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException
{
super.setupRequest(c, p);
tunnelRequest = new AccessRequest();
AttributeList attrs = tunnelRequest.getAttributes();
if (attrs.get(Attr_UserName.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(username, false));
if (attrs.get(Attr_UserPassword.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(password, false));
tunnelAuth.setupRequest(c, tunnelRequest);
tunnelAuth.processRequest(tunnelRequest);
}
代码示例来源:origin: net.jradius/jradius-extended
/**
* @throws NoSuchAlgorithmException
* @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket)
*/
public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException
{
super.setupRequest(c, p);
tunnelRequest = new AccessRequest();
AttributeList attrs = tunnelRequest.getAttributes();
if (attrs.get(Attr_UserName.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(username, false));
if (attrs.get(Attr_UserPassword.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(password, false));
tunnelAuth.setupRequest(c, tunnelRequest);
tunnelAuth.processRequest(tunnelRequest);
}
代码示例来源:origin: com.hynnet/jradius-extended
/**
* @throws NoSuchAlgorithmException
* @see net.jradius.client.auth.RadiusAuthenticator#setupRequest(net.jradius.client.RadiusClient, net.jradius.packet.RadiusPacket)
*/
public void setupRequest(RadiusClient c, RadiusPacket p) throws RadiusException, NoSuchAlgorithmException
{
super.setupRequest(c, p);
tunnelRequest = new AccessRequest();
AttributeList attrs = tunnelRequest.getAttributes();
if (attrs.get(Attr_UserName.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(username, false));
if (attrs.get(Attr_UserPassword.TYPE) == null)
attrs.add(AttributeFactory.copyAttribute(password, false));
tunnelAuth.setupRequest(c, tunnelRequest);
tunnelAuth.processRequest(tunnelRequest);
}
内容来源于网络,如有侵权,请联系作者删除!