jfr

16:37:37.681 INFO  jd.cli.Main - Decompiling jfr.jar
package com.oracle.jrockit.jfr.client;

import com.oracle.jrockit.jfr.management.FlightRecorderMBean;
import java.io.File;
import java.io.IOException;
import java.io.Reader;
import java.net.URI;
import java.net.URISyntaxException;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.OpenDataException;
import oracle.jrockit.jfr.events.EventDescriptor;
import oracle.jrockit.jfr.openmbean.EventDefaultType;
import oracle.jrockit.jfr.openmbean.EventDescriptorType;
import oracle.jrockit.jfr.openmbean.EventSettingType;
import oracle.jrockit.jfr.settings.EventDefault;
import oracle.jrockit.jfr.settings.EventDefaultSet;
import oracle.jrockit.jfr.settings.EventSetting;

@Deprecated
public final class EventSettingsBuilder
{
  private final ArrayList<EventDefaultSet> eventDefaultSets = new ArrayList();
  private final ArrayList<EventSetting> settings = new ArrayList();
  private final EventDescriptorType eventDescriptorType;
  private final EventSettingType eventSettingType;
  private final EventDefaultType eventDefaultType;
  
  public EventSettingsBuilder()
  {
    try
    {
      eventDescriptorType = new EventDescriptorType();
      eventSettingType = new EventSettingType(null);
      eventDefaultType = new EventDefaultType();
    }
    catch (OpenDataException localOpenDataException)
    {
      throw new InternalError();
    }
  }
  
  public void addSettings(File paramFile)
    throws IOException, URISyntaxException, ParseException
  {
    eventDefaultSets.add(EventDefaultSet.create(paramFile));
  }
  
  public void addSettings(String paramString)
    throws IOException, URISyntaxException, ParseException
  {
    eventDefaultSets.add(EventDefaultSet.create(paramString));
  }
  
  public void addSettings(Reader paramReader)
    throws IOException, URISyntaxException, ParseException
  {
    eventDefaultSets.add(EventDefaultSet.create(paramReader));
  }
  
  public void addSettings(EventDefaultSet paramEventDefaultSet)
  {
    eventDefaultSets.add(paramEventDefaultSet);
  }
  
  public void createSetting(String paramString, boolean paramBoolean1, boolean paramBoolean2, long paramLong1, long paramLong2)
    throws URISyntaxException
  {
    eventDefaultSets.add(new EventDefaultSet(new EventDefault[] { new EventDefault(new URI(paramString), new EventSetting(0, paramBoolean1, paramBoolean2, paramLong1, paramLong2)) }));
  }
  
  public void createSetting(int paramInt, boolean paramBoolean1, boolean paramBoolean2, long paramLong1, long paramLong2)
    throws URISyntaxException
  {
    settings.add(new EventSetting(paramInt, paramBoolean1, paramBoolean2, paramLong1, paramLong2));
  }
  
  public List<CompositeData> createSettings(FlightRecorderMBean paramFlightRecorderMBean)
    throws OpenDataException
  {
    ArrayList localArrayList = new ArrayList();
    if (!eventDefaultSets.isEmpty()) {
      for (CompositeData localCompositeData : paramFlightRecorderMBean.getProducers())
      {
        CompositeData[] arrayOfCompositeData = (CompositeData[])localCompositeData.get("events");
        for (EventDescriptor localEventDescriptor : eventDescriptorType
          .toJavaTypeData(Arrays.asList(arrayOfCompositeData)))
        {
          EventSetting localEventSetting1 = null;
          for (EventDefaultSet localEventDefaultSet : eventDefaultSets)
          {
            EventSetting localEventSetting2 = localEventDefaultSet.get(localEventDescriptor.getURI());
            if (localEventSetting2 != null) {
              localEventSetting1 = localEventSetting1 != null ? new EventSetting(localEventSetting1, localEventSetting2) : new EventSetting(localEventDescriptor, localEventSetting2);
            }
          }
          if (localEventSetting1 != null) {
            localArrayList.add(eventSettingType.toCompositeTypeData(localEventSetting1));
          }
        }
      }
    }
    localArrayList.addAll(eventSettingType.toCompositeData(settings));
    return localArrayList;
  }
  
  public List<CompositeData> createDefaultSettings()
    throws OpenDataException
  {
    ArrayList localArrayList = new ArrayList();
    for (EventDefaultSet localEventDefaultSet : eventDefaultSets) {
      localArrayList.addAll(localEventDefaultSet.getAll());
    }
    return eventDefaultType.toCompositeData(localArrayList);
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.client.EventSettingsBuilder
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr.client;

import com.oracle.jrockit.jfr.NoSuchEventException;
import com.oracle.jrockit.jfr.management.FlightRecorderMBean;
import com.oracle.jrockit.jfr.management.NoSuchRecordingException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import javax.management.InstanceNotFoundException;
import javax.management.MBeanServerConnection;
import javax.management.MBeanServerInvocationHandler;
import javax.management.MalformedObjectNameException;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.OpenDataException;
import oracle.jrockit.jfr.JFR;

@Deprecated
public final class FlightRecorderClient
  implements FlightRecorderMBean
{
  private final FlightRecorderMBean remote;
  private final MBeanServerConnection server;
  private static final ObjectName flightRecorderName;
  
  static
  {
    try
    {
      flightRecorderName = new ObjectName("com.oracle.jrockit:type=FlightRecorder");
    }
    catch (MalformedObjectNameException localMalformedObjectNameException)
    {
      throw new Error(localMalformedObjectNameException);
    }
  }
  
  public FlightRecorderClient()
    throws InstanceNotFoundException, NullPointerException, IOException
  {
    remote = JFR.get().getMBean();
    server = null;
  }
  
  public FlightRecorderClient(MBeanServerConnection paramMBeanServerConnection)
    throws InstanceNotFoundException, NullPointerException, IOException
  {
    this(paramMBeanServerConnection, flightRecorderName);
  }
  
  public FlightRecorderClient(MBeanServerConnection paramMBeanServerConnection, ObjectName paramObjectName)
    throws InstanceNotFoundException, NullPointerException, IOException
  {
    FlightRecorderMBean localFlightRecorderMBean = null;
    server = paramMBeanServerConnection;
    
    localFlightRecorderMBean = (FlightRecorderMBean)MBeanServerInvocationHandler.newProxyInstance(paramMBeanServerConnection, paramObjectName, FlightRecorderMBean.class, true);
    remote = localFlightRecorderMBean;
  }
  
  public ObjectName createRecording(String paramString)
  {
    return remote.createRecording(paramString);
  }
  
  public FlightRecordingClient createRecordingObject(String paramString)
    throws NoSuchRecordingException
  {
    ObjectName localObjectName = createRecording(paramString);
    return new FlightRecordingClient(this, getRecording(localObjectName), localObjectName);
  }
  
  public ObjectName startRecording(String paramString, CompositeData paramCompositeData, List<CompositeData> paramList1, List<CompositeData> paramList2)
    throws OpenDataException
  {
    return remote.startRecording(paramString, paramCompositeData, paramList1, paramList2);
  }
  
  public FlightRecordingClient startRecordingObject(String paramString, CompositeData paramCompositeData, List<CompositeData> paramList1, List<CompositeData> paramList2)
    throws OpenDataException
  {
    ObjectName localObjectName = startRecording(paramString, paramCompositeData, paramList1, paramList2);
    try
    {
      return new FlightRecordingClient(this, getRecording(localObjectName), localObjectName);
    }
    catch (NoSuchRecordingException localNoSuchRecordingException)
    {
      throw new InternalError();
    }
  }
  
  public void copyTo(ObjectName paramObjectName, String paramString, boolean paramBoolean)
    throws IllegalStateException, IOException, NoSuchRecordingException
  {
    remote.copyTo(paramObjectName, paramString, paramBoolean);
  }
  
  public void disableDefaultRecording()
  {
    remote.disableDefaultRecording();
  }
  
  public void enableDefaultRecording()
  {
    remote.enableDefaultRecording();
  }
  
  public boolean isDefaultRecordingRunning()
  {
    return remote.isDefaultRecordingRunning();
  }
  
  public long getDataSize(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    return remote.getDataSize(paramObjectName);
  }
  
  public void addEventDefaults(ObjectName paramObjectName, List<CompositeData> paramList)
    throws OpenDataException, NoSuchRecordingException
  {
    remote.addEventDefaults(paramObjectName, paramList);
  }
  
  public List<CompositeData> getEventDefaults()
    throws OpenDataException
  {
    return remote.getEventDefaults();
  }
  
  public List<CompositeData> getEventDefaults(ObjectName paramObjectName)
    throws OpenDataException, NoSuchRecordingException
  {
    return remote.getEventDefaults(paramObjectName);
  }
  
  public void setEventDefaults(ObjectName paramObjectName, List<CompositeData> paramList)
    throws OpenDataException, NoSuchRecordingException
  {
    remote.setEventDefaults(paramObjectName, paramList);
  }
  
  public List<CompositeData> getEventSettings()
    throws OpenDataException
  {
    return remote.getEventSettings();
  }
  
  public List<CompositeData> getProducers()
    throws OpenDataException
  {
    return remote.getProducers();
  }
  
  public List<CompositeData> getRecordings()
    throws OpenDataException
  {
    return remote.getRecordings();
  }
  
  public List<FlightRecordingClient> getRecordingObjects()
    throws OpenDataException, NoSuchRecordingException
  {
    List localList = getRecordings();
    ArrayList localArrayList = new ArrayList(localList.size());
    for (CompositeData localCompositeData : localList)
    {
      ObjectName localObjectName = (ObjectName)localCompositeData.get("objectName");
      try
      {
        localArrayList.add(new FlightRecordingClient(this, getRecording(localObjectName), localObjectName));
      }
      catch (NoSuchRecordingException localNoSuchRecordingException) {}
    }
    return localArrayList;
  }
  
  public void close(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    remote.close(paramObjectName);
  }
  
  public void closeStream(long paramLong)
    throws IOException, IllegalArgumentException
  {
    remote.closeStream(paramLong);
  }
  
  public List<CompositeData> getEventSettings(ObjectName paramObjectName)
    throws OpenDataException, NoSuchEventException, NoSuchRecordingException
  {
    return remote.getEventSettings(paramObjectName);
  }
  
  public long getPeriod(ObjectName paramObjectName, int paramInt)
    throws NoSuchEventException, NoSuchRecordingException
  {
    return remote.getPeriod(paramObjectName, paramInt);
  }
  
  public CompositeData getRecordingOptions(ObjectName paramObjectName)
    throws OpenDataException, NoSuchRecordingException
  {
    return remote.getRecordingOptions(paramObjectName);
  }
  
  public long getThreshold(ObjectName paramObjectName, int paramInt)
    throws NoSuchEventException, NoSuchRecordingException
  {
    return remote.getThreshold(paramObjectName, paramInt);
  }
  
  public boolean isEventEnabled(ObjectName paramObjectName, int paramInt)
    throws NoSuchEventException, NoSuchRecordingException
  {
    return remote.isEventEnabled(paramObjectName, paramInt);
  }
  
  public boolean isStackTraceEnabled(ObjectName paramObjectName, int paramInt)
    throws NoSuchEventException, NoSuchRecordingException
  {
    return remote.isStackTraceEnabled(paramObjectName, paramInt);
  }
  
  public long openStream(ObjectName paramObjectName, Date paramDate1, Date paramDate2)
    throws IOException, NoSuchRecordingException
  {
    return remote.openStream(paramObjectName, paramDate1, paramDate2);
  }
  
  public long openStream(ObjectName paramObjectName)
    throws NoSuchRecordingException, IOException
  {
    return remote.openStream(paramObjectName);
  }
  
  public byte[] readStream(long paramLong)
    throws IOException, IllegalArgumentException
  {
    return remote.readStream(paramLong);
  }
  
  public void setEventEnabled(ObjectName paramObjectName, int paramInt, boolean paramBoolean)
    throws NoSuchEventException, NoSuchRecordingException
  {
    remote.setEventEnabled(paramObjectName, paramInt, paramBoolean);
  }
  
  public void setPeriod(ObjectName paramObjectName, int paramInt, long paramLong)
    throws NoSuchEventException, NoSuchRecordingException
  {
    remote.setPeriod(paramObjectName, paramInt, paramLong);
  }
  
  public void setRecordingOptions(ObjectName paramObjectName, CompositeData paramCompositeData)
    throws OpenDataException, NoSuchRecordingException
  {
    remote.setRecordingOptions(paramObjectName, paramCompositeData);
  }
  
  public void setStackTraceEnabled(ObjectName paramObjectName, int paramInt, boolean paramBoolean)
    throws NoSuchEventException, NoSuchRecordingException
  {
    remote.setStackTraceEnabled(paramObjectName, paramInt, paramBoolean);
  }
  
  public void setThreshold(ObjectName paramObjectName, int paramInt, long paramLong)
    throws NoSuchEventException, NoSuchRecordingException
  {
    remote.setThreshold(paramObjectName, paramInt, paramLong);
  }
  
  public void start(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    remote.start(paramObjectName);
  }
  
  public void stop(ObjectName paramObjectName)
    throws NoSuchRecordingException, IOException
  {
    remote.stop(paramObjectName);
  }
  
  public void updateEventSettings(ObjectName paramObjectName, List<CompositeData> paramList)
    throws OpenDataException, NoSuchEventException, NoSuchRecordingException
  {
    remote.updateEventSettings(paramObjectName, paramList);
  }
  
  public long getThreshold(int paramInt)
    throws NoSuchEventException
  {
    return remote.getThreshold(paramInt);
  }
  
  public boolean isEventEnabled(int paramInt)
    throws NoSuchEventException
  {
    return remote.isEventEnabled(paramInt);
  }
  
  public boolean isStackTraceEnabled(int paramInt)
    throws NoSuchEventException
  {
    return remote.isStackTraceEnabled(paramInt);
  }
  
  public List<CompositeData> getEventDescriptors()
    throws OpenDataException
  {
    return remote.getEventDescriptors();
  }
  
  public ObjectName cloneRecording(ObjectName paramObjectName, String paramString, boolean paramBoolean)
    throws NoSuchRecordingException, IOException
  {
    return remote.cloneRecording(paramObjectName, paramString, paramBoolean);
  }
  
  public FlightRecordingClient cloneRecordingObject(ObjectName paramObjectName, String paramString, boolean paramBoolean)
    throws NoSuchRecordingException, IOException
  {
    ObjectName localObjectName = cloneRecording(paramObjectName, paramString, paramBoolean);
    return new FlightRecordingClient(this, getRecording(localObjectName), localObjectName);
  }
  
  public void copyTo(ObjectName paramObjectName, String paramString)
    throws IllegalStateException, IOException, NoSuchRecordingException
  {
    remote.copyTo(paramObjectName, paramString);
  }
  
  public List<CompositeData> getAvailablePresets()
    throws OpenDataException
  {
    return remote.getAvailablePresets();
  }
  
  public long getMaximumRepositoryChunkSize()
  {
    return remote.getMaximumRepositoryChunkSize();
  }
  
  public long getGlobalBufferSize()
  {
    return remote.getGlobalBufferSize();
  }
  
  public long getThreadBufferSize()
  {
    return remote.getThreadBufferSize();
  }
  
  public long getNumGlobalBuffers()
  {
    return remote.getNumGlobalBuffers();
  }
  
  public String getRepositoryPath()
  {
    return remote.getRepositoryPath();
  }
  
  public String toString()
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append("Flight Recorder MBean Client = {\n");
    try
    {
      for (FlightRecordingClient localFlightRecordingClient : getRecordingObjects()) {
        localStringBuilder.append('\t').append(localFlightRecordingClient).append('\n');
      }
    }
    catch (Exception localException)
    {
      localStringBuilder.append(localException);
    }
    localStringBuilder.append('}');
    return localStringBuilder.toString();
  }
  
  public CompositeData getRecordingOptionsDefaults()
    throws OpenDataException
  {
    return remote.getRecordingOptionsDefaults();
  }
  
  public CompositeData getStatistics()
    throws OpenDataException
  {
    return remote.getStatistics();
  }
  
  public Date getDataEndTime(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    return remote.getDataEndTime(paramObjectName);
  }
  
  public Date getDataStartTime(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    return remote.getDataStartTime(paramObjectName);
  }
  
  /* Error */
  private com.oracle.jrockit.jfr.management.FlightRecordingMBean getRecording(ObjectName paramObjectName)
    throws NoSuchRecordingException
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 5	com/oracle/jrockit/jfr/client/FlightRecorderClient:server	Ljavax/management/MBeanServerConnection;
    //   4: ifnull +18 -> 22
    //   7: aload_0
    //   8: getfield 5	com/oracle/jrockit/jfr/client/FlightRecorderClient:server	Ljavax/management/MBeanServerConnection;
    //   11: aload_1
    //   12: ldc 11
    //   14: iconst_1
    //   15: invokestatic 9	javax/management/MBeanServerInvocationHandler:newProxyInstance	(Ljavax/management/MBeanServerConnection;Ljavax/management/ObjectName;Ljava/lang/Class;Z)Ljava/lang/Object;
    //   18: checkcast 11	com/oracle/jrockit/jfr/management/FlightRecordingMBean
    //   21: areturn
    //   22: aload_0
    //   23: getfield 4	com/oracle/jrockit/jfr/client/FlightRecorderClient:remote	Lcom/oracle/jrockit/jfr/management/FlightRecorderMBean;
    //   26: checkcast 12	oracle/jrockit/jfr/FlightRecorder
    //   29: astore_2
    //   30: aload_2
    //   31: aload_1
    //   32: invokevirtual 13	oracle/jrockit/jfr/FlightRecorder:getRecordingMBean	(Ljavax/management/ObjectName;)Lcom/oracle/jrockit/jfr/management/FlightRecordingMBean;
    //   35: areturn
    //   36: astore_3
    //   37: new 15	java/lang/InternalError
    //   40: dup
    //   41: aload_3
    //   42: invokevirtual 16	javax/management/openmbean/OpenDataException:getMessage	()Ljava/lang/String;
    //   45: invokespecial 17	java/lang/InternalError:<init>	(Ljava/lang/String;)V
    //   48: aload_3
    //   49: invokevirtual 18	java/lang/InternalError:initCause	(Ljava/lang/Throwable;)Ljava/lang/Throwable;
    //   52: checkcast 15	java/lang/InternalError
    //   55: athrow
    //   56: astore_2
    //   57: new 20	com/oracle/jrockit/jfr/management/NoSuchRecordingException
    //   60: dup
    //   61: aload_1
    //   62: invokevirtual 21	javax/management/ObjectName:toString	()Ljava/lang/String;
    //   65: aload_2
    //   66: invokespecial 22	com/oracle/jrockit/jfr/management/NoSuchRecordingException:<init>	(Ljava/lang/String;Ljava/lang/Throwable;)V
    //   69: athrow
    // Line number table:
    //   Java source line #115	-> byte code offset #0
    //   Java source line #116	-> byte code offset #7
    //   Java source line #117	-> byte code offset #15
    //   Java source line #121	-> byte code offset #22
    //   Java source line #124	-> byte code offset #30
    //   Java source line #125	-> byte code offset #36
    //   Java source line #126	-> byte code offset #37
    //   Java source line #127	-> byte code offset #49
    //   Java source line #129	-> byte code offset #56
    //   Java source line #130	-> byte code offset #57
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	70	0	this	FlightRecorderClient
    //   0	70	1	paramObjectName	ObjectName
    //   29	2	2	localFlightRecorder	oracle.jrockit.jfr.FlightRecorder
    //   56	10	2	localException	Exception
    //   36	13	3	localOpenDataException	OpenDataException
    // Exception table:
    //   from	to	target	type
    //   30	35	36	javax/management/openmbean/OpenDataException
    //   0	21	56	java/lang/Exception
    //   22	35	56	java/lang/Exception
    //   36	56	56	java/lang/Exception
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.client.FlightRecorderClient
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr.client;

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

final class FlightRecordingClient$FlightRecordingClientStream
  extends InputStream
{
  private final long id;
  private final FlightRecordingClient client;
  private byte[] bytes;
  private boolean closed;
  private int pos;
  
  public FlightRecordingClient$FlightRecordingClientStream(FlightRecordingClient paramFlightRecordingClient)
    throws IOException
  {
    client = paramFlightRecordingClient;
    id = paramFlightRecordingClient.openStream();
    bytes = readStream();
  }
  
  public synchronized int read()
    throws IOException
  {
    if (!fill()) {
      return -1;
    }
    return bytes[(pos++)] & 0xFF;
  }
  
  public synchronized int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
    throws IOException
  {
    if (paramArrayOfByte == null) {
      throw new NullPointerException();
    }
    if ((paramInt1 < 0) || (paramInt2 < 0) || (paramArrayOfByte.length - paramInt1 < paramInt2)) {
      throw new IndexOutOfBoundsException();
    }
    if (paramInt2 == 0) {
      return 0;
    }
    if (!fill()) {
      return -1;
    }
    int i = Math.min(bytes.length - pos, paramInt2);
    System.arraycopy(bytes, pos, paramArrayOfByte, paramInt1, i);
    pos += i;
    return i;
  }
  
  public synchronized int available()
    throws IOException
  {
    if (bytes == null) {
      return 0;
    }
    return bytes.length - pos;
  }
  
  private boolean fill()
    throws IOException
  {
    if (closed) {
      throw new IOException();
    }
    if ((bytes != null) && (pos >= bytes.length))
    {
      bytes = client.readStream(id);
      pos = 0;
    }
    return bytes != null;
  }
  
  private synchronized byte[] readStream()
    throws IOException
  {
    return client.readStream(id);
  }
  
  public synchronized void close()
    throws IOException
  {
    if (!closed)
    {
      super.close();
      client.closeStream(id);
      bytes = null;
      closed = true;
    }
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.client.FlightRecordingClient.FlightRecordingClientStream
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr.client;

import com.oracle.jrockit.jfr.NoSuchEventException;
import com.oracle.jrockit.jfr.management.FlightRecordingMBean;
import com.oracle.jrockit.jfr.management.NoSuchRecordingException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.zip.GZIPInputStream;
import javax.management.ObjectName;
import javax.management.openmbean.CompositeData;
import javax.management.openmbean.OpenDataException;

@Deprecated
public class FlightRecordingClient
  implements FlightRecordingMBean
{
  protected final FlightRecorderClient client;
  protected final FlightRecordingMBean mbean;
  protected final ObjectName objectName;
  
  private static final class FlightRecordingClientStream
    extends InputStream
  {
    private final long id;
    private final FlightRecordingClient client;
    private byte[] bytes;
    private boolean closed;
    private int pos;
    
    public FlightRecordingClientStream(FlightRecordingClient paramFlightRecordingClient)
      throws IOException
    {
      client = paramFlightRecordingClient;
      id = paramFlightRecordingClient.openStream();
      bytes = readStream();
    }
    
    public synchronized int read()
      throws IOException
    {
      if (!fill()) {
        return -1;
      }
      return bytes[(pos++)] & 0xFF;
    }
    
    public synchronized int read(byte[] paramArrayOfByte, int paramInt1, int paramInt2)
      throws IOException
    {
      if (paramArrayOfByte == null) {
        throw new NullPointerException();
      }
      if ((paramInt1 < 0) || (paramInt2 < 0) || (paramArrayOfByte.length - paramInt1 < paramInt2)) {
        throw new IndexOutOfBoundsException();
      }
      if (paramInt2 == 0) {
        return 0;
      }
      if (!fill()) {
        return -1;
      }
      int i = Math.min(bytes.length - pos, paramInt2);
      System.arraycopy(bytes, pos, paramArrayOfByte, paramInt1, i);
      pos += i;
      return i;
    }
    
    public synchronized int available()
      throws IOException
    {
      if (bytes == null) {
        return 0;
      }
      return bytes.length - pos;
    }
    
    private boolean fill()
      throws IOException
    {
      if (closed) {
        throw new IOException();
      }
      if ((bytes != null) && (pos >= bytes.length))
      {
        bytes = client.readStream(id);
        pos = 0;
      }
      return bytes != null;
    }
    
    private synchronized byte[] readStream()
      throws IOException
    {
      return client.readStream(id);
    }
    
    public synchronized void close()
      throws IOException
    {
      if (!closed)
      {
        super.close();
        client.closeStream(id);
        bytes = null;
        closed = true;
      }
    }
  }
  
  FlightRecordingClient(FlightRecorderClient paramFlightRecorderClient, FlightRecordingMBean paramFlightRecordingMBean, ObjectName paramObjectName)
  {
    client = paramFlightRecorderClient;
    objectName = paramObjectName;
    mbean = paramFlightRecordingMBean;
  }
  
  protected FlightRecordingClient(FlightRecordingClient paramFlightRecordingClient)
  {
    this(client, mbean, objectName);
  }
  
  public ObjectName getObjectName()
  {
    return objectName;
  }
  
  public boolean isDestinationCompressed()
  {
    return mbean.isDestinationCompressed();
  }
  
  public void setDestinationCompressed(boolean paramBoolean)
  {
    mbean.setDestinationCompressed(paramBoolean);
  }
  
  public void copyTo(String paramString, boolean paramBoolean)
    throws IllegalStateException, IOException
  {
    mbean.copyTo(paramString, paramBoolean);
  }
  
  public void close()
  {
    mbean.close();
  }
  
  public void closeStream(long paramLong)
    throws IOException, IllegalArgumentException
  {
    mbean.closeStream(paramLong);
  }
  
  public String getDestination()
  {
    return mbean.getDestination();
  }
  
  public long getDuration()
  {
    return mbean.getDuration();
  }
  
  public void addEventDefaults(List<CompositeData> paramList)
    throws OpenDataException
  {
    mbean.addEventDefaults(paramList);
  }
  
  public List<CompositeData> getEventDefaults()
    throws OpenDataException
  {
    return mbean.getEventDefaults();
  }
  
  public void setEventDefaults(List<CompositeData> paramList)
    throws OpenDataException
  {
    mbean.setEventDefaults(paramList);
  }
  
  public List<CompositeData> getEventSettings()
    throws OpenDataException
  {
    return mbean.getEventSettings();
  }
  
  public long getId()
  {
    return mbean.getId();
  }
  
  public long getMaxAge()
  {
    return mbean.getMaxAge();
  }
  
  public long getMaxSize()
  {
    return mbean.getMaxSize();
  }
  
  public String getName()
  {
    return mbean.getName();
  }
  
  public long getDataSize()
  {
    return mbean.getDataSize();
  }
  
  public CompositeData getOptions()
    throws OpenDataException
  {
    return mbean.getOptions();
  }
  
  public long getPeriod(int paramInt)
    throws NoSuchEventException
  {
    return mbean.getPeriod(paramInt);
  }
  
  public Date getStartTime()
  {
    return mbean.getStartTime();
  }
  
  public long getThreshold(int paramInt)
    throws NoSuchEventException
  {
    return mbean.getThreshold(paramInt);
  }
  
  public boolean isEventEnabled(int paramInt)
    throws NoSuchEventException
  {
    return mbean.isEventEnabled(paramInt);
  }
  
  public boolean isRunning()
  {
    return mbean.isRunning();
  }
  
  public boolean isStackTraceEnabled(int paramInt)
    throws NoSuchEventException
  {
    return mbean.isStackTraceEnabled(paramInt);
  }
  
  public boolean isStarted()
  {
    return mbean.isStarted();
  }
  
  public boolean isStopped()
  {
    return mbean.isStopped();
  }
  
  public long openStream()
    throws IOException
  {
    return mbean.openStream();
  }
  
  public long openStream(Date paramDate1, Date paramDate2)
    throws IOException
  {
    return mbean.openStream(paramDate1, paramDate2);
  }
  
  public ObjectName cloneRecording(String paramString, boolean paramBoolean)
    throws IOException
  {
    return mbean.cloneRecording(paramString, paramBoolean);
  }
  
  public FlightRecordingClient cloneRecordingObject(String paramString, boolean paramBoolean)
    throws IOException
  {
    try
    {
      return client.cloneRecordingObject(objectName, paramString, paramBoolean);
    }
    catch (NoSuchRecordingException localNoSuchRecordingException)
    {
      throw new InternalError();
    }
  }
  
  public void copyTo(String paramString)
    throws IllegalStateException, IOException
  {
    mbean.copyTo(paramString);
  }
  
  public byte[] readStream(long paramLong)
    throws IOException, IllegalArgumentException
  {
    return mbean.readStream(paramLong);
  }
  
  public void setDestination(String paramString)
    throws IOException
  {
    mbean.setDestination(paramString);
  }
  
  public void setDuration(long paramLong)
  {
    mbean.setDuration(paramLong);
  }
  
  public void setEventEnabled(int paramInt, boolean paramBoolean)
    throws NoSuchEventException
  {
    mbean.setEventEnabled(paramInt, paramBoolean);
  }
  
  public void setEventSettings(List<CompositeData> paramList)
    throws OpenDataException
  {
    mbean.setEventSettings(paramList);
  }
  
  public void setMaxAge(long paramLong)
  {
    mbean.setMaxAge(paramLong);
  }
  
  public void setMaxSize(long paramLong)
  {
    mbean.setMaxSize(paramLong);
  }
  
  public void setOptions(CompositeData paramCompositeData)
    throws OpenDataException
  {
    mbean.setOptions(paramCompositeData);
  }
  
  public void setPeriod(int paramInt, long paramLong)
    throws NoSuchEventException
  {
    mbean.setPeriod(paramInt, paramLong);
  }
  
  public void setStackTraceEnabled(int paramInt, boolean paramBoolean)
    throws NoSuchEventException
  {
    mbean.setStackTraceEnabled(paramInt, paramBoolean);
  }
  
  public void setStartTime(Date paramDate)
  {
    mbean.setStartTime(paramDate);
  }
  
  public void setThreshold(int paramInt, long paramLong)
    throws NoSuchEventException
  {
    mbean.setThreshold(paramInt, paramLong);
  }
  
  public void start()
  {
    mbean.start();
  }
  
  public void stop()
    throws IOException
  {
    mbean.stop();
  }
  
  public InputStream openStreamObject()
    throws IOException
  {
    return new FlightRecordingClientStream(this);
  }
  
  public InputStream openUncompressedStreamObject()
    throws IOException
  {
    return new GZIPInputStream(openStreamObject());
  }
  
  public String toString()
  {
    StringBuilder localStringBuilder = new StringBuilder();
    localStringBuilder.append(objectName);
    String str = getDestination();
    if (str != null) {
      localStringBuilder.append(", destination=").append(str);
    }
    Date localDate1 = getStartTime();
    if (localDate1 != null) {
      localStringBuilder.append(", start=").append(localDate1);
    }
    Date localDate2 = getDataStartTime();
    if (localDate2 != null) {
      localStringBuilder.append(", dataStartTime=").append(localDate2);
    }
    localDate2 = getDataEndTime();
    if (localDate2 != null) {
      localStringBuilder.append(", dataEndTime=").append(localDate2);
    }
    long l1 = getDuration();
    if (l1 != 0L) {
      localStringBuilder.append(", duration=").append(l1);
    }
    long l2 = getMaxAge();
    if (l2 != 0L) {
      localStringBuilder.append(", maxAge=").append(l2);
    }
    long l3 = getMaxSize();
    if (l3 != 0L) {
      localStringBuilder.append(", maxSize=").append(l3);
    }
    return localStringBuilder.toString();
  }
  
  public boolean isToDisk()
  {
    return mbean.isToDisk();
  }
  
  public void setToDisk(boolean paramBoolean)
  {
    mbean.setToDisk(paramBoolean);
  }
  
  public Date getDataEndTime()
  {
    return mbean.getDataEndTime();
  }
  
  public Date getDataStartTime()
  {
    return mbean.getDataStartTime();
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.client.FlightRecordingClient
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

@Deprecated
public enum ContentType
{
  None,  Bytes,  Timestamp,  Millis,  Nanos,  Ticks,  Address,  OSThread(false),  JavaThread(false),  StackTrace(false),  Class(false),  Percentage;
  
  private final boolean allowedForUserValue;
  
  private ContentType(boolean paramBoolean)
  {
    allowedForUserValue = paramBoolean;
  }
  
  private ContentType()
  {
    this(true);
  }
  
  public boolean isAllowedForUserValue()
  {
    return allowedForUserValue;
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.ContentType
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

@Deprecated
public enum DataType
{
  BOOLEAN(Boolean.TYPE, 1, true),  BYTE(Byte.TYPE, 1, true),  U1(Byte.TYPE, 1),  SHORT(Short.TYPE, 2, true),  U2(Short.TYPE, 2, false),  INTEGER(Integer.TYPE, 4, true),  U4(Integer.TYPE, 4),  LONG(Long.TYPE, 8, true),  U8(Long.TYPE, 8),  FLOAT(Float.TYPE, 4, true),  DOUBLE(Double.TYPE, 8, true),  UTF8(String.class, 0),  STRING(String.class, 0, true),  ARRAY,  STRUCT,  STRUCTARRAY;
  
  private final Class<?> javaType;
  private final int size;
  private final boolean primary;
  
  private DataType()
  {
    this(null, 0, false);
  }
  
  private DataType(Class<?> paramClass, int paramInt, boolean paramBoolean)
  {
    javaType = paramClass;
    size = paramInt;
    primary = paramBoolean;
  }
  
  private DataType(Class<?> paramClass, int paramInt)
  {
    this(paramClass, paramInt, false);
  }
  
  public int getSize()
  {
    return size;
  }
  
  public boolean isPrimary()
  {
    return primary;
  }
  
  public Class<?> getJavaType()
  {
    return javaType;
  }
  
  public boolean isPrimitive()
  {
    return ordinal() < ARRAY.ordinal();
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.DataType
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

@Deprecated
final class DelegatingDynamicRequestableEvent
  extends RequestableEvent
{
  private final RequestDelegate delegate;
  
  public DelegatingDynamicRequestableEvent(DynamicEventToken paramDynamicEventToken)
  {
    super(paramDynamicEventToken);
    delegate = paramDynamicEventToken.getRequestDelegate();
  }
  
  public void request()
  {
    delegate.onRequest(this);
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.DelegatingDynamicRequestableEvent
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

import oracle.jrockit.jfr.events.EventHandler;

@Deprecated
public class DurationEvent
  extends InstantEvent
{
  long start;
  long end;
  private long startThreadId;
  
  protected DurationEvent() {}
  
  protected DurationEvent(EventToken paramEventToken)
  {
    super(paramEventToken);
  }
  
  public final void begin()
  {
    if (start != 0L) {
      throw new IllegalStateException("Event time period already started.");
    }
    start = eventInfo.counterTime();
    startThreadId = Thread.currentThread().getId();
  }
  
  public final void end()
    throws IllegalStateException
  {
    if (start == 0L) {
      throw new IllegalStateException("Not started");
    }
    end = eventInfo.counterTime();
    long l = Thread.currentThread().getId();
    if (l != startThreadId) {
      throw new IllegalStateException("Thread started in thread " + startThreadId + ", ended in " + l);
    }
  }
  
  void write()
  {
    eventInfo.write(receiver, start, end);
  }
  
  public final void reset()
  {
    start = 0L;
    startThreadId = 0L;
    super.reset();
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.DurationEvent
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

import oracle.jrockit.jfr.events.EventHandler;
import oracle.jrockit.jfr.events.JavaEventDescriptor;

@Deprecated
public final class DynamicEventToken
  extends EventToken
{
  private final JavaEventDescriptor descriptor;
  
  DynamicEventToken(EventHandler paramEventHandler, RequestDelegate paramRequestDelegate)
  {
    super(paramEventHandler, paramRequestDelegate);
    descriptor = paramEventHandler.getDescriptor();
  }
  
  Object receiverFor(InstantEvent paramInstantEvent)
  {
    return new Object[descriptor.getValues().length];
  }
  
  public InstantEvent newInstantEvent()
    throws UnsupportedOperationException
  {
    if (descriptor.getEventClass() != InstantEvent.class) {
      throw new UnsupportedOperationException("Not an InstantEvent");
    }
    return new InstantEvent(this);
  }
  
  public DurationEvent newDurationEvent()
    throws UnsupportedOperationException
  {
    if (descriptor.getEventClass() != DurationEvent.class) {
      throw new UnsupportedOperationException("Not a DurationEvent");
    }
    return new DurationEvent(this);
  }
  
  public TimedEvent newTimedEvent()
    throws UnsupportedOperationException
  {
    if (descriptor.getEventClass() != TimedEvent.class) {
      throw new UnsupportedOperationException("Not a TimedEvent");
    }
    return new TimedEvent(this);
  }
  
  public RequestableEvent newRequestableEvent()
    throws UnsupportedOperationException
  {
    if (descriptor.getEventClass() != DelegatingDynamicRequestableEvent.class) {
      throw new UnsupportedOperationException("Not a RequestableEvent");
    }
    return new DelegatingDynamicRequestableEvent(this);
  }
}

/* Location:
 * Qualified Name:     com.oracle.jrockit.jfr.DynamicEventToken
 * Java Class Version: 8 (52.0)
 * JD-Core Version:    0.7.1
 */
package com.oracle.jrockit.jfr;

import oracle.jrockit.jfr.events.ValueDescriptor;

@Deprecated
public final class DynamicValue
{
  private final ValueDescriptor descriptor;
  
  public DynamicValue(String paramString1, String paramString2, String paramString3, ContentType paramContentType, Transition paramTransition, Class<?> paramClass)
    throws InvalidValueException
  {
    descriptor = new ValueDescriptor(paramString1, paramString2, paramString3, null, paramContentType, paramTransition, null, null, paramClass);
  }
  
  public DynamicValue(String paramString1, String paramString2, String paramString3, ContentType paramContentType, Class<?> paramClass)
    throws InvalidValueException
  {
    this(paramString1, paramString2, paramString3, paramContentType, Transition.None, paramClass);
  }
  
  public DynamicValue(String paramString1, String paramString2, String paramString3, Class<?> paramClass)
    throws InvalidValueException
  {
    this(paramString1, paramString2, paramString3, ContentType.None, Transition.None, paramClass);
  }
  
  public DynamicValue(String paramString1, String paramString2, String paramString3, String paramString4, ContentType paramContentType, Transition paramTransition, String paramString5, Class<?> paramClass)
    throws InvalidValueException
  {
    descriptor = new ValueDescriptor(paramString1, paramString2, paramString3, paramString4, paramContentType, paramTransition, paramString5, null, paramClass);
  }
  
  public DynamicValue(String paramString1, String paramString2, String paramString3, String paramString4, ContentType paramContentType, String param
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

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-2017. Infinite Loop Ltd