AXL RADIUS Server API V3

com.theorem.radserver3
Interface ProxyImplFactory


public interface ProxyImplFactory

This interface defines a factory for implementing proxy changes. Typically this will look like:

 // Return the concrete Logging class.
 //
 class MakeProxy implements ProxyImplFactory
 {
 	public LogImpl createProxyImpl()
 	{
 		// create an instance of PlainLogImpl
		// This could be more exotic using a class loader.
 		return new PlainProxyImpl();
 	}

 }
 class PlainProxyImpl extends ProxyImpl
 {

 	// Change proxy routing.
 	//
	protected Attribute [] changeProxy(String name, int packetType, Attributes list[], byte authenticator)
 	{
		// If the name is Michael send them elsewhere.
		if (name.startsWith("Michael"))
 		{
			if (packetType != 1)
 				return null;	// Not our type.  Only alter Access-Request.

 			int i;

 			for (i = 0; i < list.length; i++)
			{
				// Look for the User-Name attr.
 				if (list[i].getTag() == PacketType.Access_Request)
 				{
 					// Change it to go to theorem.com.
					list[i] = new Attribute(1, "Michael@theorem.com".getBytes());
 					return list;
				}
 			}
 		}
			return null;	// Do nothing, since there wasn't a match.
 	}
 

See Also:
ProxyImpl

Method Summary
 ProxyImpl createProxyImpl()
          Creates a new ProxyImpl instance.
 

Method Detail

createProxyImpl

public ProxyImpl createProxyImpl()
Creates a new ProxyImpl instance.


AXL RADIUS Server API V3

Submit a bug report or feature request

Copyright 1998-2008 AXL Software. PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.