org.eclipse.osgi.services_3.3.0.v20110513

nectionFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.io;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import javax.microedition.io.Connection;

public abstract interface ConnectorService
{
  public static final int READ = 1;
  public static final int WRITE = 2;
  public static final int READ_WRITE = 3;
  
  public abstract Connection open(String paramString)
    throws IOException;
  
  public abstract Connection open(String paramString, int paramInt)
    throws IOException;
  
  public abstract Connection open(String paramString, int paramInt, boolean paramBoolean)
    throws IOException;
  
  public abstract InputStream openInputStream(String paramString)
    throws IOException;
  
  public abstract DataInputStream openDataInputStream(String paramString)
    throws IOException;
  
  public abstract OutputStream openOutputStream(String paramString)
    throws IOException;
  
  public abstract DataOutputStream openDataOutputStream(String paramString)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.io.ConnectorService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;

public abstract interface LogEntry
{
  public abstract Bundle getBundle();
  
  public abstract ServiceReference getServiceReference();
  
  public abstract int getLevel();
  
  public abstract String getMessage();
  
  public abstract Throwable getException();
  
  public abstract long getTime();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.EventListener;

public abstract interface LogListener
  extends EventListener
{
  public abstract void logged(LogEntry paramLogEntry);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.Enumeration;

public abstract interface LogReaderService
{
  public abstract void addLogListener(LogListener paramLogListener);
  
  public abstract void removeLogListener(LogListener paramLogListener);
  
  public abstract Enumeration getLog();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogReaderService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.ServiceReference;

public abstract interface LogService
{
  public static final int LOG_ERROR = 1;
  public static final int LOG_WARNING = 2;
  public static final int LOG_INFO = 3;
  public static final int LOG_DEBUG = 4;
  
  public abstract void log(int paramInt, String paramString);
  
  public abstract void log(int paramInt, String paramString, Throwable paramThrowable);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString, Throwable paramThrowable);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

public abstract interface AttributeDefinition
{
  public static final int STRING = 1;
  public static final int LONG = 2;
  public static final int INTEGER = 3;
  public static final int SHORT = 4;
  public static final int CHARACTER = 5;
  public static final int BYTE = 6;
  public static final int DOUBLE = 7;
  public static final int FLOAT = 8;
  /**
   * @deprecated
   */
  public static final int BIGINTEGER = 9;
  /**
   * @deprecated
   */
  public static final int BIGDECIMAL = 10;
  public static final int BOOLEAN = 11;
  public static final int PASSWORD = 12;
  
  public abstract String getName();
  
  public abstract String getID();
  
  public abstract String getDescription();
  
  public abstract int getCardinality();
  
  public abstract int getType();
  
  public abstract String[] getOptionValues();
  
  public abstract String[] getOptionLabels();
  
  public abstract String validate(String paramString);
  
  public abstract String[] getDefaultValue();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.AttributeDefinition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import org.osgi.framework.Bundle;

public abstract interface MetaTypeInformation
  extends MetaTypeProvider
{
  public abstract String[] getPids();
  
  public abstract String[] getFactoryPids();
  
  public abstract Bundle getBundle();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeInformation
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

public abstract interface MetaTypeProvider
{
  public static final String METATYPE_PID = "metatype.pid";
  public static final String METATYPE_FACTORY_PID = "metatype.factory.pid";
  
  public abstract ObjectClassDefinition getObjectClassDefinition(String paramString1, String paramString2);
  
  public abstract String[] getLocales();
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeProvider
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import org.osgi.framework.Bundle;

public abstract interface MetaTypeService
{
  public static final String METATYPE_DOCUMENTS_LOCATION = "OSGI-INF/metatype";
  
  public abstract MetaTypeInformation getMetaTypeInformation(Bundle paramBundle);
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.MetaTypeService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.metatype;

import java.io.IOException;
import java.io.InputStream;

public abstract interface ObjectClassDefinition
{
  public static final int REQUIRED = 1;
  public static final int OPTIONAL = 2;
  public static final int ALL = -1;
  
  public abstract String getName();
  
  public abstract String getID();
  
  public abstract String getDescription();
  
  public abstract AttributeDefinition[] getAttributeDefinitions(int paramInt);
  
  public abstract InputStream getIcon(int paramInt)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.metatype.ObjectClassDefinition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.provisioning;

import java.io.IOException;
import java.util.Dictionary;
import java.util.zip.ZipInputStream;

public abstract interface ProvisioningService
{
  public static final String PROVISIONING_SPID = "provisioning.spid";
  public static final String PROVISIONING_REFERENCE = "provisioning.reference";
  public static final String PROVISIONING_AGENT_CONFIG = "provisioning.agent.config";
  public static final String PROVISIONING_UPDATE_COUNT = "provisioning.update.count";
  public static final String PROVISIONING_START_BUNDLE = "provisioning.start.bundle";
  public static final String PROVISIONING_ROOTX509 = "provisioning.rootx509";
  public static final String PROVISIONING_RSH_SECRET = "provisioning.rsh.secret";
  public static final String MIME_STRING = "text/plain;charset=utf-8";
  public static final String MIME_BYTE_ARRAY = "application/octet-stream";
  public static final String MIME_BUNDLE = "application/vnd.osgi.bundle";
  public static final String MIME_BUNDLE_ALT = "application/x-osgi-bundle";
  public static final String MIME_BUNDLE_URL = "text/x-osgi-bundle-url";
  public static final String INITIALPROVISIONING_ENTRIES = "InitialProvisioning-Entries";
  
  public abstract Dictionary getInformation();
  
  public abstract void setInformation(Dictionary paramDictionary);
  
  public abstract void addInformation(Dictionary paramDictionary);
  
  public abstract void addInformation(ZipInputStream paramZipInputStream)
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.provisioning.ProvisioningService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPAction
{
  public abstract String getName();
  
  public abstract String getReturnArgumentName();
  
  public abstract String[] getInputArgumentNames();
  
  public abstract String[] getOutputArgumentNames();
  
  public abstract UPnPStateVariable getStateVariable(String paramString);
  
  public abstract Dictionary invoke(Dictionary paramDictionary)
    throws Exception;
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPAction
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPDevice
{
  public static final int MATCH_GENERIC = 1;
  public static final int MATCH_TYPE = 3;
  public static final int MATCH_MANUFACTURER_MODEL = 7;
  public static final int MATCH_MANUFACTURER_MODEL_REVISION = 15;
  public static final int MATCH_MANUFACTURER_MODEL_REVISION_SERIAL = 31;
  public static final String DEVICE_CATEGORY = "UPnP";
  public static final String UPNP_EXPORT = "UPnP.export";
  public static final String UDN = "UPnP.device.UDN";
  public static final String ID = "UPnP.device.UDN";
  public static final String TYPE = "UPnP.device.type";
  public static final String MANUFACTURER = "UPnP.device.manufacturer";
  public static final String MODEL_NAME = "UPnP.device.modelName";
  public static final String FRIENDLY_NAME = "UPnP.device.friendlyName";
  public static final String MANUFACTURER_URL = "UPnP.device.manufacturerURL";
  public static final String MODEL_DESCRIPTION = "UPnP.device.modelDescription";
  public static final String MODEL_NUMBER = "UPnP.device.modelNumber";
  public static final String MODEL_URL = "UPnP.device.modelURL";
  public static final String SERIAL_NUMBER = "UPnP.device.serialNumber";
  public static final String UPC = "UPnP.device.UPC";
  public static final String PRESENTATION_URL = "UPnP.presentationURL";
  public static final String PARENT_UDN = "UPnP.device.parentUDN";
  public static final String CHILDREN_UDN = "UPnP.device.childrenUDN";
  
  public abstract UPnPService getService(String paramString);
  
  public abstract UPnPService[] getServices();
  
  public abstract UPnPIcon[] getIcons(String paramString);
  
  public abstract Dictionary getDescriptions(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPDevice
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.util.Dictionary;

public abstract interface UPnPEventListener
{
  public static final String UPNP_FILTER = "upnp.filter";
  
  public abstract void notifyUPnPEvent(String paramString1, String paramString2, Dictionary paramDictionary);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPEventListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public class UPnPException
  extends Exception
{
  static final long serialVersionUID = -262013318122195146L;
  public static final int INVALID_ACTION = 401;
  public static final int INVALID_ARGS = 402;
  public static final int INVALID_SEQUENCE_NUMBER = 403;
  public static final int INVALID_VARIABLE = 404;
  public static final int DEVICE_INTERNAL_ERROR = 501;
  private final int errorCode;
  
  public UPnPException(int errorCode, String errordesc)
  {
    super(errordesc);
    this.errorCode = errorCode;
  }
  
  public int getUPnPError_Code()
  {
    return errorCode;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPException
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

import java.io.IOException;
import java.io.InputStream;

public abstract interface UPnPIcon
{
  public abstract String getMimeType();
  
  public abstract int getWidth();
  
  public abstract int getHeight();
  
  public abstract int getSize();
  
  public abstract int getDepth();
  
  public abstract InputStream getInputStream()
    throws IOException;
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPIcon
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPLocalStateVariable
  extends UPnPStateVariable
{
  public abstract Object getCurrentValue();
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPLocalStateVariable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPService
{
  public static final String TYPE = "UPnP.service.type";
  public static final String ID = "UPnP.service.id";
  
  public abstract String getId();
  
  public abstract String getType();
  
  public abstract String getVersion();
  
  public abstract UPnPAction getAction(String paramString);
  
  public abstract UPnPAction[] getActions();
  
  public abstract UPnPStateVariable[] getStateVariables();
  
  public abstract UPnPStateVariable getStateVariable(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.upnp;

public abstract interface UPnPStateVariable
{
  public static final String TYPE_UI1 = "ui1";
  public static final String TYPE_UI2 = "ui2";
  public static final String TYPE_UI4 = "ui4";
  public static final String TYPE_I1 = "i1";
  public static final String TYPE_I2 = "i2";
  public static final String TYPE_I4 = "i4";
  public static final String TYPE_INT = "int";
  public static final String TYPE_R4 = "r4";
  public static final String TYPE_R8 = "r8";
  public static final String TYPE_NUMBER = "number";
  public static final String TYPE_FIXED_14_4 = "fixed.14.4";
  public static final String TYPE_FLOAT = "float";
  public static final String TYPE_CHAR = "char";
  public static final String TYPE_STRING = "string";
  public static final String TYPE_DATE = "date";
  public static final String TYPE_DATETIME = "dateTime";
  public static final String TYPE_DATETIME_TZ = "dateTime.tz";
  public static final String TYPE_TIME = "time";
  public static final String TYPE_TIME_TZ = "time.tz";
  public static final String TYPE_BOOLEAN = "boolean";
  public static final String TYPE_BIN_BASE64 = "bin.base64";
  public static final String TYPE_BIN_HEX = "bin.hex";
  public static final String TYPE_URI = "uri";
  public static final String TYPE_UUID = "uuid";
  
  public abstract String getName();
  
  public abstract Class getJavaDataType();
  
  public abstract String getUPnPDataType();
  
  public abstract Object getDefaultValue();
  
  public abstract String[] getAllowedValues();
  
  public abstract Number getMinimum();
  
  public abstract Number getMaximum();
  
  public abstract Number getStep();
  
  public abstract boolean sendsEvents();
}

/* Location:
 * Qualified Name:     org.osgi.service.upnp.UPnPStateVariable
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface Authorization
{
  public abstract String getName();
  
  public abstract boolean hasRole(String paramString);
  
  public abstract String[] getRoles();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Authorization
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface Group
  extends User
{
  public abstract boolean addMember(Role paramRole);
  
  public abstract boolean addRequiredMember(Role paramRole);
  
  public abstract boolean removeMember(Role paramRole);
  
  public abstract Role[] getMembers();
  
  public abstract Role[] getRequiredMembers();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Group
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.util.Dictionary;

public abstract interface Role
{
  public static final String USER_ANYONE = "user.anyone";
  public static final int ROLE = 0;
  public static final int USER = 1;
  public static final int GROUP = 2;
  
  public abstract String getName();
  
  public abstract int getType();
  
  public abstract Dictionary getProperties();
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.Role
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.util.Dictionary;

public abstract interface User
  extends Role
{
  public abstract Dictionary getCredentials();
  
  public abstract boolean hasCredential(String paramString, Object paramObject);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.User
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import org.osgi.framework.InvalidSyntaxException;

public abstract interface UserAdmin
{
  public abstract Role createRole(String paramString, int paramInt);
  
  public abstract boolean removeRole(String paramString);
  
  public abstract Role getRole(String paramString);
  
  public abstract Role[] getRoles(String paramString)
    throws InvalidSyntaxException;
  
  public abstract User getUser(String paramString1, String paramString2);
  
  public abstract Authorization getAuthorization(User paramUser);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import org.osgi.framework.ServiceReference;

public class UserAdminEvent
{
  private ServiceReference ref;
  private int type;
  private Role role;
  public static final int ROLE_CREATED = 1;
  public static final int ROLE_CHANGED = 2;
  public static final int ROLE_REMOVED = 4;
  
  public UserAdminEvent(ServiceReference ref, int type, Role role)
  {
    this.ref = ref;
    this.type = type;
    this.role = role;
  }
  
  public ServiceReference getServiceReference()
  {
    return ref;
  }
  
  public int getType()
  {
    return type;
  }
  
  public Role getRole()
  {
    return role;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminEvent
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

public abstract interface UserAdminListener
{
  public abstract void roleChanged(UserAdminEvent paramUserAdminEvent);
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.BasicPermission;
import java.security.Permission;
import java.security.PermissionCollection;

public final class UserAdminPermission
  extends BasicPermission
{
  static final long serialVersionUID = -1179971692401603789L;
  public static final String ADMIN = "admin";
  public static final String CHANGE_PROPERTY = "changeProperty";
  private static final int ACTION_CHANGE_PROPERTY = 1;
  public static final String CHANGE_CREDENTIAL = "changeCredential";
  private static final int ACTION_CHANGE_CREDENTIAL = 2;
  public static final String GET_CREDENTIAL = "getCredential";
  private static final int ACTION_GET_CREDENTIAL = 4;
  private static final int ACTION_ALL = 7;
  static final int ACTION_NONE = 0;
  private volatile String actions = null;
  private transient int action_mask;
  
  public UserAdminPermission(String name, String actions)
  {
    this(name, parseActions(actions));
  }
  
  UserAdminPermission(String name, int mask)
  {
    super(name);
    setTransients(mask);
  }
  
  private synchronized void setTransients(int mask)
  {
    if (getName().equals("admin"))
    {
      if (mask != 0) {
        throw new IllegalArgumentException("Actions specified for no-action UserAdminPermission");
      }
    }
    else if ((mask == 0) || ((mask & 0x7) != mask)) {
      throw new IllegalArgumentException("Invalid action string");
    }
    action_mask = mask;
  }
  
  synchronized int getActionsMask()
  {
    return action_mask;
  }
  
  private static int parseActions(String actions)
  {
    boolean seencomma = false;
    int mask = 0;
    if (actions == null) {
      return mask;
    }
    char[] a = actions.toCharArray();
    int i = a.length - 1;
    if (i < 0) {
      return mask;
    }
    while (i != -1)
    {
      char c;
      while ((i != -1) && (((c = a[i]) == ' ') || (c == '\r') || (c == '\n') || (c == '\f') || (c == '\t'))) {
        i--;
      }
      if ((i >= 12) && (match_get(a, i - 10)) && (match_credential(a, i)))
      {
        int matchlen = 13;
        mask |= 0x4;
      }
      else if ((i >= 13) && (match_change(a, i - 8)) && (match_property(a, i)))
      {
        int matchlen = 14;
        mask |= 0x1;
      }
      else if ((i >= 15) && (match_change(a, i - 10)) && (match_credential(a, i)))
      {
        int matchlen = 16;
        mask |= 0x2;
      }
      else
      {
        throw new IllegalArgumentException("invalid permission: " + actions);
      }
      int matchlen;
      seencomma = false;
      while ((i >= matchlen) && (!seencomma))
      {
        switch (a[(i - matchlen)])
        {
        case ',': 
          seencomma = true;
        case '\t': 
        case '\n': 
        case '\f': 
        case '\r': 
        case ' ': 
          break;
        default: 
          throw new IllegalArgumentException("invalid permission: " + actions);
        }
        i--;
      }
      i -= matchlen;
    }
    if (seencomma) {
      throw new IllegalArgumentException("invalid permission: " + actions);
    }
    return mask;
  }
  
  private static boolean match_change(char[] a, int i)
  {
    return ((a[(i - 5)] == 'c') || (a[(i - 5)] == 'C')) && ((a[(i - 4)] == 'h') || (a[(i - 4)] == 'H')) && ((a[(i - 3)] == 'a') || (a[(i - 3)] == 'A')) && ((a[(i - 2)] == 'n') || (a[(i - 2)] == 'N')) && ((a[(i - 1)] == 'g') || (a[(i - 1)] == 'G')) && ((a[(i - 0)] == 'e') || (a[(i - 0)] == 'E'));
  }
  
  private static boolean match_get(char[] a, int i)
  {
    return ((a[(i - 2)] == 'g') || (a[(i - 2)] == 'G')) && ((a[(i - 1)] == 'e') || (a[(i - 1)] == 'E')) && ((a[(i - 0)] == 't') || (a[(i - 0)] == 'T'));
  }
  
  private static boolean match_property(char[] a, int i)
  {
    return ((a[(i - 7)] == 'p') || (a[(i - 7)] == 'P')) && ((a[(i - 6)] == 'r') || (a[(i - 6)] == 'R')) && ((a[(i - 5)] == 'o') || (a[(i - 5)] == 'O')) && ((a[(i - 4)] == 'p') || (a[(i - 4)] == 'P')) && ((a[(i - 3)] == 'e') || (a[(i - 3)] == 'E')) && ((a[(i - 2)] == 'r') || (a[(i - 2)] == 'R')) && ((a[(i - 1)] == 't') || (a[(i - 1)] == 'T')) && ((a[(i - 0)] == 'y') || (a[(i - 0)] == 'Y'));
  }
  
  private static boolean match_credential(char[] a, int i)
  {
    return ((a[(i - 9)] == 'c') || (a[(i - 9)] == 'C')) && ((a[(i - 8)] == 'r') || (a[(i - 8)] == 'R')) && ((a[(i - 7)] == 'e') || (a[(i - 7)] == 'E')) && ((a[(i - 6)] == 'd') || (a[(i - 6)] == 'D')) && ((a[(i - 5)] == 'e') || (a[(i - 5)] == 'E')) && ((a[(i - 4)] == 'n') || (a[(i - 4)] == 'N')) && ((a[(i - 3)] == 't') || (a[(i - 3)] == 'T')) && ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && ((a[(i - 1)] == 'a') || (a[(i - 1)] == 'A')) && ((a[(i - 0)] == 'l') || (a[(i - 0)] == 'L'));
  }
  
  public boolean implies(Permission p)
  {
    if ((p instanceof UserAdminPermission))
    {
      UserAdminPermission requested = (UserAdminPermission)p;
      int mask = getActionsMask();
      int targetMask = requested.getActionsMask();
      return ((targetMask & mask) == targetMask) && ((targetMask != 0) || (mask == 0)) && (super.implies(p));
    }
    return false;
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      int mask = getActionsMask();
      if ((mask & 0x2) == 2)
      {
        sb.append("changeCredential");
        comma = true;
      }
      if ((mask & 0x1) == 1)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("changeProperty");
        comma = true;
      }
      if ((mask & 0x4) == 4)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("getCredential");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new UserAdminPermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof UserAdminPermission)) {
      return false;
    }
    UserAdminPermission uap = (UserAdminPermission)obj;
    
    return (getActionsMask() == uap.getActionsMask()) && (getName().equals(uap.getName()));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(parseActions(actions));
  }
  
  public String toString()
  {
    StringBuffer sb = new StringBuffer();
    sb.append('(');
    sb.append(getClass().getName());
    sb.append(" \"");
    sb.append(getName());
    String a = getActions();
    if (a.length() > 0)
    {
      sb.append("\" \"");
      sb.append(a);
    }
    sb.append("\")");
    return sb.toString();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminPermission
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.useradmin;

import java.security.Permission;
import java.security.PermissionCollection;
import java.util.Enumeration;
import java.util.Hashtable;

final class UserAdminPermissionCollection
  extends PermissionCollection
{
  static final long serialVersionUID = -7222111885230120581L;
  private final Hashtable permissions;
  private boolean all_allowed;
  
  public UserAdminPermissionCollection()
  {
    permissions = new Hashtable();
    all_allowed = false;
  }
  
  public void add(Permission permission)
  {
    if (!(permission instanceof UserAdminPermission)) {
      throw new IllegalArgumentException("Invalid permission: " + permission);
    }
    if (isReadOnly()) {
      throw new SecurityException("Attempt to add a Permission to a readonly PermissionCollection");
    }
    UserAdminPermission uap = (UserAdminPermission)permission;
    String name = uap.getName();
    synchronized (this)
    {
      UserAdminPermission existing = (UserAdminPermission)permissions.get(name);
      if (existing != null)
      {
        int oldMask = existing.getActionsMask();
        int newMask = uap.getActionsMask();
        if (oldMask != newMask) {
          permissions.put(name, new UserAdminPermission(name, oldMask | newMask));
        }
      }
      else
      {
        permissions.put(name, uap);
      }
      if ((!all_allowed) && 
        (name.equals("*"))) {
        all_allowed = true;
      }
    }
  }
  
  public boolean implies(Permission permission)
  {
    if (!(permission instanceof UserAdminPermission)) {
      return false;
    }
    UserAdminPermission requested = (UserAdminPermission)permission;
    String name = requested.getName();
    int desired = requested.getActionsMask();
    
    int effective = 0;
    UserAdminPermission x;
    synchronized (this)
    {
      if ((all_allowed) && (desired != 0))
      {
        UserAdminPermission x = (UserAdminPermission)permissions.get("*");
        if (x != null)
        {
          effective |= x.getActionsMask();
          if ((effective & desired) == desired) {
            return true;
          }
        }
      }
      x = (UserAdminPermission)permissions.get(name);
    }
    if (x != null)
    {
      effective |= x.getActionsMask();
      if ((effective & desired) == desired) {
        return true;
      }
    }
    int offset = name.length() - 1;
    int last;
    while ((last = name.lastIndexOf(".", offset)) != -1)
    {
      name = name.substring(0, last + 1) + "*";
      synchronized (this)
      {
        x = (UserAdminPermission)permissions.get(name);
      }
      if (x != null)
      {
        effective |= x.getActionsMask();
        if ((effective & desired) == desired) {
          return true;
        }
      }
      offset = last - 1;
    }
    return false;
  }
  
  public Enumeration elements()
  {
    return permissions.elements();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.useradmin.UserAdminPermissionCollection
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public class BasicEnvelope
  implements Envelope
{
  Object value;
  Object identification;
  String scope;
  
  public BasicEnvelope(Object value, Object identification, String scope)
  {
    this.value = value;
    this.identification = identification;
    this.scope = scope;
  }
  
  public Object getValue()
  {
    return value;
  }
  
  public Object getIdentification()
  {
    return identification;
  }
  
  public String getScope()
  {
    return scope;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.BasicEnvelope
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public abstract interface Consumer
{
  public abstract void updated(Wire paramWire, Object paramObject);
  
  public abstract void producersConnected(Wire[] paramArrayOfWire);
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.Consumer
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public abstract interface Envelope
{
  public abstract Object getValue();
  
  public abstract Object getIdentification();
  
  public abstract String getScope();
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.Envelope
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public abstract interface Producer
{
  public abstract Object polled(Wire paramWire);
  
  public abstract void consumersConnected(Wire[] paramArrayOfWire);
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.Producer
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

import java.util.Dictionary;

public abstract interface Wire
{
  public abstract boolean isValid();
  
  public abstract boolean isConnected();
  
  public abstract Class[] getFlavors();
  
  public abstract void update(Object paramObject);
  
  public abstract Object poll();
  
  public abstract Object getLastValue();
  
  public abstract Dictionary getProperties();
  
  public abstract String[] getScope();
  
  public abstract boolean hasScope(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.Wire
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

import java.util.Dictionary;
import org.osgi.framework.InvalidSyntaxException;

public abstract interface WireAdmin
{
  public abstract Wire createWire(String paramString1, String paramString2, Dictionary paramDictionary);
  
  public abstract void deleteWire(Wire paramWire);
  
  public abstract void updateWire(Wire paramWire, Dictionary paramDictionary);
  
  public abstract Wire[] getWires(String paramString)
    throws InvalidSyntaxException;
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.WireAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

import org.osgi.framework.ServiceReference;

public class WireAdminEvent
{
  private ServiceReference reference;
  private Wire wire;
  private int type;
  private Throwable throwable;
  public static final int PRODUCER_EXCEPTION = 1;
  public static final int CONSUMER_EXCEPTION = 2;
  public static final int WIRE_CREATED = 4;
  public static final int WIRE_UPDATED = 8;
  public static final int WIRE_DELETED = 16;
  public static final int WIRE_CONNECTED = 32;
  public static final int WIRE_DISCONNECTED = 64;
  public static final int WIRE_TRACE = 128;
  
  public WireAdminEvent(ServiceReference reference, int type, Wire wire, Throwable exception)
  {
    this.reference = reference;
    this.wire = wire;
    this.type = type;
    throwable = exception;
  }
  
  public ServiceReference getServiceReference()
  {
    return reference;
  }
  
  public Wire getWire()
  {
    return wire;
  }
  
  public int getType()
  {
    return type;
  }
  
  public Throwable getThrowable()
  {
    return throwable;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.WireAdminEvent
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public abstract interface WireAdminListener
{
  public abstract void wireAdminEvent(WireAdminEvent paramWireAdminEvent);
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.WireAdminListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

public abstract interface WireConstants
{
  public static final String WIREADMIN_PID = "wireadmin.pid";
  public static final String WIREADMIN_PRODUCER_COMPOSITE = "wireadmin.producer.composite";
  public static final String WIREADMIN_CONSUMER_COMPOSITE = "wireadmin.consumer.composite";
  public static final String WIREADMIN_PRODUCER_SCOPE = "wireadmin.producer.scope";
  public static final String WIREADMIN_CONSUMER_SCOPE = "wireadmin.consumer.scope";
  public static final String[] WIREADMIN_SCOPE_ALL = { "*" };
  public static final String WIREADMIN_PRODUCER_PID = "wireadmin.producer.pid";
  public static final String WIREADMIN_CONSUMER_PID = "wireadmin.consumer.pid";
  public static final String WIREADMIN_FILTER = "wireadmin.filter";
  public static final String WIREVALUE_CURRENT = "wirevalue.current";
  public static final String WIREVALUE_PREVIOUS = "wirevalue.previous";
  public static final String WIREVALUE_DELTA_ABSOLUTE = "wirevalue.delta.absolute";
  public static final String WIREVALUE_DELTA_RELATIVE = "wirevalue.delta.relative";
  public static final String WIREVALUE_ELAPSED = "wirevalue.elapsed";
  public static final String WIREADMIN_PRODUCER_FILTERS = "wireadmin.producer.filters";
  public static final String WIREADMIN_CONSUMER_FLAVORS = "wireadmin.consumer.flavors";
  public static final String WIREADMIN_PRODUCER_FLAVORS = "wireadmin.producer.flavors";
  public static final String WIREADMIN_EVENTS = "wireadmin.events";
}

/* Location:
 * Qualified Name:     org.osgi.service.wireadmin.WireConstants
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.wireadmin;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.BasicPermission;
import java.security.Permission;
import java.security.PermissionCollection;

public final class WirePermission
  extends BasicPermission
{
  static final long serialVersionUID = -5583709391516569321L;
  public static final String PRODUCE = "produce";
  public static final String CONSUME = "consume";
  private static final int ACTION_PRODUCE = 1;
  private static final int ACTION_CONSUME = 2;
  private static final int ACTION_ALL = 3;
  private static final int ACTION_NONE = 0;
  private transient int action_mask;
  private volatile String actions = null;
  
  public WirePermission(String name, String actions)
  {
    this(name, parseActions(actions));
  }
  
  WirePermission(String name, int mask)
  {
    super(name);
    setTransients(mask);
  }
  
  private synchronized void setTransients(int mask)
  {
    if ((mask == 0) || ((mask & 0x3) != mask)) {
      throw new IllegalArgumentException("invalid action string");
    }
    action_mask = mask;
  }
  
  synchronized int getActionsMask()
  {
    return action_mask;
  }
  
  private static int parseActions(String actions)
  {
    boolean seencomma = false;
    int mask = 0;
    if (actions == null) {
      return mask;
    }
    char[] a = actions.toCharArray();
    int i = a.length - 1;
    if (i < 0) {
      return mask;
    }
    while (i != -1)
    {
      char c;
      while ((i != -1) && (((c = a[i]) == ' ') || (c == '\r') || (c == '\n') || (c == '\f') || (c == '\t'))) {
        i--;
      }
      if ((i >= 6) && ((a[(i - 6)] == 'p') || (a[(i - 6)] == 'P')) && ((a[(i - 5)] == 'r') || (a[(i - 5)] == 'R')) && ((a[(i - 4)] == 'o') || (a[(i - 4)] == 'O')) && ((a[(i - 3)] == 'd') || (a[(i - 3)] == 'D')) && ((a[(i - 2)] == 'u') || (a[(i - 2)] == 'U')) && ((a[(i - 1)] == 'c') || (a[(i - 1)] == 'C')) && ((a[i] == 'e') || (a[i] == 'E')))
      {
        int matchlen = 7;
        mask |= 0x1;
      }
      else if ((i >= 6) && ((a[(i - 6)] == 'c') || (a[(i - 6)] == 'C')) && ((a[(i - 5)] == 'o') || (a[(i - 5)] == 'O')) && ((a[(i - 4)] == 'n') || (a[(i - 4)] == 'N')) && ((a[(i - 3)] == 's') || (a[(i - 3)] == 'S')) && ((a[(i - 2)] == 'u') || (a[(i - 2)] == 'U')) && ((a[(i - 1)] == 'm') || (a[(i - 1)] == 'M')) && ((a[i] == 'e') || (a[i] == 'E')))
      {
        int matchlen = 7;
        mask |= 0x2;
      }
      else
      {
        throw new IllegalArgumentException("invalid permission: " + actions);
      }
      int matchlen;
      seencomma = false;
      while ((i >= matchlen) && (!seencomma))
      {
        switch (a[(i - matchlen)])
        {
        case ',': 
          seencomma = true;
        case '\t': 
        case '\n': 
        case '\f': 
        case '\r': 
        case ' ': 
          break;
        default: 
          throw new IllegalArgumentException("invalid permission: " + actions);
        }
        i--;
      }
      i -= matchlen;
    }
    if (seencomma) {
      throw new IllegalArgumentException("invalid permission: " + actions);
    }
    return mask;
  }
  
  public boolean implies(Permission p)
  {
    if ((p instanceof WirePermission))
    {
      WirePermission requested = (WirePermission)p;
      int requestedMask = requested.getActionsMask();
      return ((getActionsMask() & requestedMask) == requestedMask) && (super.implies(p));
    }
    return false;
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      int mask = getActionsMask();
      if ((mask & 0x1) == 1)
      {
        sb.append("produce");
        comma = true;
      }
      if ((mask & 0x2) == 2)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("consume");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new WirePermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof WirePermission)) {
      return false;
    }
    WirePermission wp = (WirePermission)obj;
    return (getActionsMask() == wp.getActionsMask()) && (getName().equals(wp.getName()));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    return h;
  }
  
  public String toString()
  {
    StringBuffer sb = new StringBuffer();
    sb.append('(');
    sb.append(getClass().getNam
1 2 3

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd