|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.iids.aos.agent.AgentArchive
public class AgentArchive
AgentArcive class, contains pre-made segments and (some) agent info to make it easier to import/export agent code and data segments.
The archive can either be read from or exported to a file/byte[]. This agent archive can in principle contain all the (meta) information required to create and run an agent, though if code segments are missing, or there is no active code segment identified, this is not possible. In other words, an archive need not contain the information for a "complete" running agent.
| Constructor Summary | |
|---|---|
AgentArchive()
Create a new (empty) agent archive. |
|
AgentArchive(byte[] source)
Import agent archive from a byte array. |
|
AgentArchive(java.io.File source)
Import agent archive from a file. |
|
AgentArchive(java.io.InputStream in)
Import agent archive from input stream. |
|
| Method Summary | |
|---|---|
void |
deleteCodeSegment(AgentCodeSegment seg)
|
void |
deleteDataSegment(AgentDataSegment seg)
|
void |
exportArchive(java.lang.String path)
|
AgentCodeSegment |
getDefaultCodeSegment()
|
AgentCodeSegment[] |
listCodeSegments()
|
AgentDataSegment[] |
listDataSegments()
|
byte[] |
readCode(AgentCodeSegment seg)
|
byte[] |
readCode(java.lang.String description,
java.lang.String subtype)
|
byte[] |
readData(AgentDataSegment seg)
|
byte[] |
readData(java.lang.String description,
java.lang.String subtype)
|
void |
setDefaultCodeSegment(AgentCodeSegment active)
|
void |
setDefaultCodeSegment(java.lang.String description,
java.lang.String subtype)
|
void |
writeCode(AgentCodeSegment seg,
byte[] code)
|
void |
writeCode(java.lang.String description,
java.lang.String subtype,
byte[] code)
|
void |
writeData(AgentDataSegment seg,
byte[] data)
|
void |
writeData(java.lang.String description,
java.lang.String subtype,
byte[] data)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AgentArchive()
public AgentArchive(java.io.File source)
throws AgentArchiveException
source - AgentArchive file to import.
AgentArchiveException
public AgentArchive(byte[] source)
throws AgentArchiveException
source - AgentArchive file to import.
AgentArchiveException
public AgentArchive(java.io.InputStream in)
throws AgentArchiveException
in - InputStream to read archive from.
AgentArchiveException| Method Detail |
|---|
public void exportArchive(java.lang.String path)
throws AgentArchiveException
AgentArchiveException
public void writeCode(AgentCodeSegment seg,
byte[] code)
public void writeCode(java.lang.String description,
java.lang.String subtype,
byte[] code)
public void writeData(AgentDataSegment seg,
byte[] data)
public void writeData(java.lang.String description,
java.lang.String subtype,
byte[] data)
public byte[] readCode(AgentCodeSegment seg)
throws SegmentUnknownException
SegmentUnknownException
public byte[] readCode(java.lang.String description,
java.lang.String subtype)
throws SegmentUnknownException
SegmentUnknownException
public byte[] readData(AgentDataSegment seg)
throws SegmentUnknownException
SegmentUnknownException
public byte[] readData(java.lang.String description,
java.lang.String subtype)
throws SegmentUnknownException
SegmentUnknownExceptionpublic void setDefaultCodeSegment(AgentCodeSegment active)
public void setDefaultCodeSegment(java.lang.String description,
java.lang.String subtype)
public AgentCodeSegment getDefaultCodeSegment()
throws SegmentUnknownException
SegmentUnknownExceptionpublic AgentCodeSegment[] listCodeSegments()
public AgentDataSegment[] listDataSegments()
public void deleteCodeSegment(AgentCodeSegment seg)
throws SegmentUnknownException
SegmentUnknownException
public void deleteDataSegment(AgentDataSegment seg)
throws SegmentUnknownException
SegmentUnknownException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||