org.apache.sirona.cube
Class Cube

java.lang.Object
  extended by org.apache.sirona.cube.Cube
Direct Known Subclasses:
AsyncHttpClientCube, HttpClientCube

public class Cube
extends Object


Field Summary
protected static String APPLICATION_JAVA_OBJECT
           
protected static String APPLICATION_JSON
           
protected static String CONTENT_ENCODING
           
protected static String CONTENT_LENGTH
           
protected static String CONTENT_TYPE
           
protected static String GZIP_CONTENT_ENCODING
           
protected static String POST
           
protected static String X_SIRONA_CLASSNAME
           
 
Constructor Summary
Cube(CubeBuilder cubeBuilder)
           
 
Method Summary
 StringBuilder buildEvent(StringBuilder builder, String type, long time, Map<String,Object> data)
           
 StringBuilder counterSnapshot(Collection<Counter> instances)
           
protected  void doPost(String payload)
           
 void doPostBytes(byte[] bytes, String className)
           
static String finalPayload(String events)
           
 StringBuilder gaugeSnapshot(StringBuilder base, long time, Role role, double value)
           
protected  CubeBuilder getConfig()
           
 String globalPayload(StringBuilder payload)
           
 StringBuilder newEventStream()
           
 StringBuilder pathTrackingSnapshot(Collection<PathTrackingEntry> pathTrackingEntries)
           
 StringBuilder pathTrackingSnapshot(PathTrackingEntry pathTrackingEntry)
           
 void post(StringBuilder payload)
           
 StringBuilder statusSnapshot(long ts, NodeStatus nodeStatus)
           
static byte[] toByteArray(InputStream input)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

POST

protected static final String POST
See Also:
Constant Field Values

CONTENT_TYPE

protected static final String CONTENT_TYPE
See Also:
Constant Field Values

APPLICATION_JSON

protected static final String APPLICATION_JSON
See Also:
Constant Field Values

CONTENT_LENGTH

protected static final String CONTENT_LENGTH
See Also:
Constant Field Values

GZIP_CONTENT_ENCODING

protected static final String GZIP_CONTENT_ENCODING
See Also:
Constant Field Values

CONTENT_ENCODING

protected static final String CONTENT_ENCODING
See Also:
Constant Field Values

APPLICATION_JAVA_OBJECT

protected static final String APPLICATION_JAVA_OBJECT
See Also:
Constant Field Values

X_SIRONA_CLASSNAME

protected static final String X_SIRONA_CLASSNAME
See Also:
Constant Field Values
Constructor Detail

Cube

public Cube(CubeBuilder cubeBuilder)
Method Detail

newEventStream

public StringBuilder newEventStream()

globalPayload

public String globalPayload(StringBuilder payload)

post

public void post(StringBuilder payload)

doPostBytes

public void doPostBytes(byte[] bytes,
                        String className)

doPost

protected void doPost(String payload)

toByteArray

public static byte[] toByteArray(InputStream input)
                          throws IOException
Throws:
IOException

finalPayload

public static String finalPayload(String events)

buildEvent

public StringBuilder buildEvent(StringBuilder builder,
                                String type,
                                long time,
                                Map<String,Object> data)

counterSnapshot

public StringBuilder counterSnapshot(Collection<Counter> instances)

pathTrackingSnapshot

public StringBuilder pathTrackingSnapshot(Collection<PathTrackingEntry> pathTrackingEntries)

pathTrackingSnapshot

public StringBuilder pathTrackingSnapshot(PathTrackingEntry pathTrackingEntry)

gaugeSnapshot

public StringBuilder gaugeSnapshot(StringBuilder base,
                                   long time,
                                   Role role,
                                   double value)

statusSnapshot

public StringBuilder statusSnapshot(long ts,
                                    NodeStatus nodeStatus)

getConfig

protected CubeBuilder getConfig()


Copyright © 2008–2014 The Apache Software Foundation. All rights reserved.