{
throw new IllegalArgumentException("This encoder can only be used with instances of " +
ISharedResourceRequestTarget.class.getName());
}
final ISharedResourceRequestTarget target = (ISharedResourceRequestTarget)requestTarget;
// create url to shared resource
final AppendingStringBuffer url = new AppendingStringBuffer();
url.append(getMountPath());
final RequestParameters requestParameters = target.getRequestParameters();
@SuppressWarnings("unchecked")
Map<String, Object> params = requestParameters.getParameters();
if (params != null)