Search in sources :

Example 1 with OrderType

use of common.OrderType in project cloudstack by apache.

the class AwtCanvasAdapter method handleData.

@Override
public void handleData(ByteBuffer buf, Link link) {
    if (verbose)
        System.out.println("[" + this + "] INFO: Data received: " + buf + ".");
    Order order = buf.getOrder();
    switch((OrderType) order.type) {
        case BITMAP_UPDATE:
            handleBitmap((BitmapOrder) order, buf);
            break;
        case COPY_RECT:
            handleCopyRect((CopyRectOrder) order, buf);
            break;
        default:
            throw new RuntimeException("Order is not implemented: " + buf + ".");
    }
    buf.unref();
}
Also used : BitmapOrder(common.BitmapOrder) Order(streamer.Order) CopyRectOrder(common.CopyRectOrder) OrderType(common.OrderType)

Aggregations

BitmapOrder (common.BitmapOrder)1 CopyRectOrder (common.CopyRectOrder)1 OrderType (common.OrderType)1 Order (streamer.Order)1