Mercurial > hg > FederatedLinda
view src/fdl/PSXQueue.java @ 22:56e015e8f5dc
Testing TestLindaServer
author | kono |
---|---|
date | Tue, 19 Aug 2008 16:02:48 +0900 |
parents | 609b288f47f9 |
children | b4fd7fb9135a |
line wrap: on
line source
/* * @(#)PSXQueue.java 1.1 06/04/01 * * Copyright 2006 Shinji KONO * PSX Lidna Trasport layer of PSX Linda library */ package fdl; import java.io.IOException; import java.nio.ByteBuffer; /** PSXQueue Iterator */ public class PSXQueue { public int tspace_id; public int id; public int mode; public int size; public ByteBuffer data; public ByteBuffer command; public int seq; public PSXCallback callback; public PSXQueue next; public PSXLinda linda; public PSXQueue( PSXLinda _linda,int _id,int _mode,ByteBuffer _data,int _size,PSXCallback _callback) { linda = _linda; id = _id; data = _data; size = _size; mode = _mode; callback = _callback; setCommand(); } private void setCommand() { command = PSX.setCommand(mode,id,size,seq); } public void setSeq(int _seq) { seq = _seq; command.putInt(PSX.LINDA_SEQ_OFFSET,seq); } public void Send() throws IOException { if (command!=null) command.rewind(); if (data!=null) data.rewind(); linda.send(command,data); } } /* end */