public String toString() { StringBuffer sb = new StringBuffer("{"); sb.append(" requester = ").append(getSender()); sb.append(", type = ").append(getTypeString()); sb.append(" }"); return sb.toString(); } }
public String toString() { StringBuffer sb = new StringBuffer("{"); sb.append(" requester = ").append(getSender()); sb.append(", type = ").append(getTypeString()); sb.append(" }"); return sb.toString(); } }
/** * Generates a session hash key based on dhcp-packet attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getDHCPRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPGatewayIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPTransactionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPClientHardwareAddress.TYPE, true)); return sb.toString(); }
public Serializable getTunneledRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_ServiceType.TYPE, false)); return sb.toString(); }
public Serializable getTunneledRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_ServiceType.TYPE, false)); return sb.toString(); }
public Serializable getTunneledRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_ServiceType.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on dhcp-packet attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getDHCPRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPGatewayIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPTransactionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPClientHardwareAddress.TYPE, true)); return sb.toString(); }
/** * Generates a session hash key based on dhcp-packet attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getDHCPRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPGatewayIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPTransactionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_DHCPClientHardwareAddress.TYPE, true)); return sb.toString(); }
/** * Generates a session hash key based on access-request attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccessRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on access-request attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccessRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on access-request attributes. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccessRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on accounting-request attribtues. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccountingRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on accounting-request attribtues. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccountingRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
/** * Generates a session hash key based on accounting-request attribtues. * @param request The JRadiusRequest * @return the session key * @throws RadiusException */ public Serializable getAccountingRequestKey(JRadiusRequest request) throws RadiusException { RadiusPacket req = request.getRequestPacket(); StringBuffer sb = new StringBuffer((String)request.getSender()); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIPAddress.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_AcctSessionId.TYPE, true)); sb.append(":").append(getKeyFromAttributeType(req, Attr_NASIdentifier.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_UserName.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CallingStationId.TYPE, false)); sb.append(":").append(getKeyFromAttributeType(req, Attr_CalledStationId.TYPE, false)); return sb.toString(); }
public void printDebugInfo() { if (Configuration.isDebug()) { RadiusPacket[] rp = this.getPackets(); StringWriter sw = new StringWriter(); PrintWriter pw = new PrintWriter(sw); // debug info: pw.println(">>> packets in request from \"" + getSender() + "\":"); for (int i=0; i < rp.length; i++) if (rp[i] != null) { pw.println("--- packet " + (i+1) + " of " + rp.length); pw.println(rp[i].toString()); } pw.println("Configuration Items:"); pw.println(getConfigItems().toString()); pw.flush(); RadiusLog.debug(sw.toString()); } }
public HandlerLogEvent(JRadiusRequest request, String sessionKey, int result) { setSender(request.getSender()); setRequest(request); setSessionKey(sessionKey); this.result = result; }
public HandlerLogEvent(JRadiusRequest request, String sessionKey, int result) { setSender(request.getSender()); setRequest(request); setSessionKey(sessionKey); this.result = result; }
public JRadiusSession getSession(JRadiusRequest request, Serializable key) throws RadiusException { Element element = sessionCache.get(key); JRadiusSession session = null; if (element != null) { session = (JRadiusSession) element.getValue(); } if (session == null && request != null) { SessionFactory sf = getSessionFactory(request.getSender()); session = sf.getSession(request, key); if (session != null) { put(session.getJRadiusKey(), session); put(session.getSessionKey(), session); } } if (session == null) return null; return session; }
public JRadiusSession newSession(JRadiusRequest request, Object key) throws RadiusException { JRadiusSession session = (JRadiusSession) getSessionFactory(request.getSender()).newSession(request); session.setJRadiusKey((String)key); put(session.getJRadiusKey(), session); put(session.getSessionKey(), session); return session; }
public JRadiusSession newSession(JRadiusRequest request, Object key) throws RadiusException { JRadiusSession session = (JRadiusSession) getSessionFactory(request.getSender()).newSession(request); session.setJRadiusKey((String)key); put(session.getJRadiusKey(), session); put(session.getSessionKey(), session); return session; }