Methods Summary |
---|
public RPReply | _process(RPRequest request)
String method = request.getMethod();
Object[] params = (Object[])request.getParams();
if ( method.equals( "getPluginIntParameter[String,int]")){
return( new RPReply( new Integer( delegate.getPluginIntParameter((String)params[0],((Integer)params[1]).intValue()))));
}else if ( method.equals( "getPluginStringParameter[String,String]")){
return( new RPReply( delegate.getPluginStringParameter((String)params[0],(String)params[1])));
}else if ( method.equals( "setPluginParameter[String,int]")){
delegate.setPluginParameter((String)params[0],((Integer)params[1]).intValue());
return( null );
}else if ( method.equals( "getIntParameter[String,int]") ||
method.equals( "getParameter[String,int]")){
return( new RPReply( new Integer( delegate.getIntParameter((String)params[0],((Integer)params[1]).intValue()))));
}else if ( method.equals( "setParameter[String,int]")){
delegate.setIntParameter((String)params[0],((Integer)params[1]).intValue());
return( null );
}else if ( method.equals( "save")){
try{
delegate.save();
return( null );
}catch( PluginException e ){
return( new RPReply( e ));
}
}
throw( new RPException( "Unknown method: " + method ));
|
protected void | _setDelegate(java.lang.Object _delegate)
delegate = (PluginConfig)_delegate;
cached_property_names = new String[]{
CORE_PARAM_INT_MAX_UPLOAD_SPEED_KBYTES_PER_SEC,
CORE_PARAM_INT_MAX_UPLOAD_SPEED_SEEDING_KBYTES_PER_SEC,
CORE_PARAM_INT_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC,
CORE_PARAM_INT_MAX_CONNECTIONS_PER_TORRENT,
CORE_PARAM_INT_MAX_CONNECTIONS_GLOBAL,
CORE_PARAM_INT_MAX_DOWNLOADS,
CORE_PARAM_INT_MAX_ACTIVE,
CORE_PARAM_INT_MAX_ACTIVE_SEEDING,
CORE_PARAM_INT_MAX_UPLOADS,
CORE_PARAM_INT_MAX_UPLOADS_SEEDING
};
cached_property_values = new Object[]{
new Integer( delegate.getIntParameter( cached_property_names[0] )),
new Integer( delegate.getIntParameter( cached_property_names[1] )),
new Integer( delegate.getIntParameter( cached_property_names[2] )),
new Integer( delegate.getIntParameter( cached_property_names[3] )),
new Integer( delegate.getIntParameter( cached_property_names[4] )),
new Integer( delegate.getIntParameter( cached_property_names[5] )),
new Integer( delegate.getIntParameter( cached_property_names[6] )),
new Integer( delegate.getIntParameter( cached_property_names[7] )),
new Integer( delegate.getIntParameter( cached_property_names[8] )),
new Integer( delegate.getIntParameter( cached_property_names[9] ))
};
|
public java.lang.Object | _setLocal()
return( _fixupLocal());
|
public void | _setRemote(RPRequestDispatcher _dispatcher)
super._setRemote( _dispatcher );
property_cache = new Properties();
for (int i=0;i<cached_property_names.length;i++){
// System.out.println( "cache:" + cached_property_names[i] + "=" + cached_property_values[i] );
property_cache.put(cached_property_names[i],cached_property_values[i]);
}
|
public void | addListener(PluginConfigListener l)
notSupported();
|
public static PluginConfig | create(PluginConfig _delegate)
RPPluginConfig res =(RPPluginConfig)_lookupLocal( _delegate );
if ( res == null ){
res = new RPPluginConfig( _delegate );
}
return( res );
|
public boolean | getBooleanParameter(java.lang.String key)
notSupported();
return(false);
|
public boolean | getBooleanParameter(java.lang.String key, boolean _default)
notSupported();
return( false );
|
public byte[] | getByteParameter(java.lang.String name, byte[] _default)
notSupported();
return( null );
|
public byte[] | getByteParameter(java.lang.String key)notSupported(); return null;
|
public float | getFloatParameter(java.lang.String key, float default_value)notSupported(); return 0;
|
public float | getFloatParameter(java.lang.String key)
notSupported();
return(0);
|
public int | getIntParameter(java.lang.String key)
notSupported();
return(0);
|
public int | getIntParameter(java.lang.String key, int default_value)
Integer res = (Integer)property_cache.get( key );
if ( res == null ){
res = (Integer)_dispatcher.dispatch( new RPRequest( this, "getIntParameter[String,int]", new Object[]{key,new Integer(default_value)} )).getResponse();
}
return( res.intValue());
|
public long | getLongParameter(java.lang.String key)notSupported(); return 0;
|
public long | getLongParameter(java.lang.String key, long default_value)notSupported(); return 0;
|
public org.gudy.azureus2.plugins.config.ConfigParameter | getParameter(java.lang.String key)
notSupported();
return( null );
|
public boolean | getPluginBooleanParameter(java.lang.String key)
notSupported();
return(false);
|
public boolean | getPluginBooleanParameter(java.lang.String key, boolean defaultValue)
notSupported();
return(false);
|
public byte[] | getPluginByteParameter(java.lang.String key, byte[] defaultValue)
notSupported();
return(null);
|
public byte[] | getPluginByteParameter(java.lang.String key)notSupported(); return null;
|
public java.lang.String | getPluginConfigKeyPrefix()
notSupported();
return(null);
|
public float | getPluginFloatParameter(java.lang.String key)notSupported(); return 0;
|
public float | getPluginFloatParameter(java.lang.String key, float default_value)notSupported(); return 0;
|
public int | getPluginIntParameter(java.lang.String key)
notSupported();
return(0);
|
public int | getPluginIntParameter(java.lang.String key, int defaultValue)
Integer res = (Integer)_dispatcher.dispatch( new RPRequest( this, "getPluginIntParameter[String,int]", new Object[]{key,new Integer(defaultValue)} )).getResponse();
return( res.intValue());
|
public java.util.List | getPluginListParameter(java.lang.String key, java.util.List default_value)
notSupported();
return( null );
|
public long | getPluginLongParameter(java.lang.String key)notSupported(); return 0;
|
public long | getPluginLongParameter(java.lang.String key, long default_value)notSupported(); return 0;
|
public java.util.Map | getPluginMapParameter(java.lang.String key, java.util.Map default_value)
notSupported();
return( null );
|
public org.gudy.azureus2.plugins.config.ConfigParameter | getPluginParameter(java.lang.String key)
notSupported();
return( null );
|
public java.lang.String | getPluginStringParameter(java.lang.String key)
notSupported();
return(null);
|
public java.lang.String | getPluginStringParameter(java.lang.String key, java.lang.String defaultValue)
String res = (String)_dispatcher.dispatch( new RPRequest( this, "getPluginStringParameter[String,String]", new Object[]{key,defaultValue} )).getResponse();
return( res );
|
public java.io.File | getPluginUserFile(java.lang.String name)
notSupported();
return( null );
|
public java.lang.String | getStringParameter(java.lang.String key)
notSupported();
return(null);
|
public java.lang.String | getStringParameter(java.lang.String name, java.lang.String _default)
notSupported();
return(null);
|
public boolean | getUnsafeBooleanParameter(java.lang.String key, boolean default_value)
notSupported();
return( false );
|
public boolean | getUnsafeBooleanParameter(java.lang.String key)notSupported(); return false;
|
public byte[] | getUnsafeByteParameter(java.lang.String key)notSupported(); return null;
|
public byte[] | getUnsafeByteParameter(java.lang.String key, byte[] default_value)notSupported(); return null;
|
public float | getUnsafeFloatParameter(java.lang.String key, float default_value)
notSupported();
return( 0 );
|
public float | getUnsafeFloatParameter(java.lang.String key)notSupported(); return 0;
|
public int | getUnsafeIntParameter(java.lang.String key, int default_value)
notSupported();
return( 0 );
|
public int | getUnsafeIntParameter(java.lang.String key)notSupported(); return 0;
|
public long | getUnsafeLongParameter(java.lang.String key, long default_value)
notSupported();
return( 0 );
|
public long | getUnsafeLongParameter(java.lang.String key)notSupported(); return 0;
|
public java.util.Map | getUnsafeParameterList()
notSupported();
return( null );
|
public java.lang.String | getUnsafeStringParameter(java.lang.String key, java.lang.String default_value)
notSupported();
return( null );
|
public java.lang.String | getUnsafeStringParameter(java.lang.String key)notSupported(); return null;
|
public boolean | hasParameter(java.lang.String x)notSupported(); return false;
|
public boolean | hasPluginParameter(java.lang.String x)notSupported(); return false;
|
public boolean | isNewInstall()
notSupported();
return( false );
|
public boolean | removePluginParameter(java.lang.String x)notSupported(); return false;
|
public void | save()
try{
_dispatcher.dispatch( new RPRequest( this, "save", null)).getResponse();
}catch( RPException e ){
Throwable cause = e.getCause();
if ( cause instanceof PluginException ){
throw((PluginException)cause);
}
throw( e );
}
|
public void | setBooleanParameter(java.lang.String key, boolean value)
notSupported();
|
public void | setByteParameter(java.lang.String key, byte[] value)notSupported();
|
public void | setFloatParameter(java.lang.String key, float value)notSupported();
|
public void | setIntParameter(java.lang.String key, int value)
property_cache.put( key, new Integer( value ));
_dispatcher.dispatch( new RPRequest( this, "setParameter[String,int]", new Object[]{key,new Integer(value)} )).getResponse();
|
public void | setLongParameter(java.lang.String key, long value)notSupported();
|
public void | setPluginConfigKeyPrefix(java.lang.String _key)
// TODO Auto-generated method stub
|
public void | setPluginListParameter(java.lang.String key, java.util.List value)
notSupported();
|
public void | setPluginMapParameter(java.lang.String key, java.util.Map value)
notSupported();
|
public void | setPluginParameter(java.lang.String key, int value)
_dispatcher.dispatch( new RPRequest( this, "setPluginParameter[String,int]", new Object[]{key,new Integer(value)} ));
|
public void | setPluginParameter(java.lang.String key, int value, boolean global)
notSupported();
|
public void | setPluginParameter(java.lang.String key, java.lang.String value)
notSupported();
|
public void | setPluginParameter(java.lang.String key, boolean value)
notSupported();
|
public void | setPluginParameter(java.lang.String key, byte[] value)
notSupported();
|
public void | setPluginParameter(java.lang.String key, float value)notSupported();
|
public void | setPluginParameter(java.lang.String key, long value)notSupported();
|
public void | setStringParameter(java.lang.String key, java.lang.String value)notSupported();
|
public void | setUnsafeBooleanParameter(java.lang.String key, boolean value)
notSupported();
|
public void | setUnsafeByteParameter(java.lang.String key, byte[] value)notSupported();
|
public void | setUnsafeFloatParameter(java.lang.String key, float value)
notSupported();
|
public void | setUnsafeIntParameter(java.lang.String key, int value)
notSupported();
|
public void | setUnsafeLongParameter(java.lang.String key, long value)
notSupported();
|
public void | setUnsafeStringParameter(java.lang.String key, java.lang.String value)
notSupported();
|