aktbus.core
Class RDFAktMessage

java.lang.Object
  |
  +--com.hp.hpl.mesa.rdf.jena.common.ModelCom
        |
        +--com.hp.hpl.mesa.rdf.jena.mem.ModelMem
              |
              +--aktbus.core.RDFAktMessage
All Implemented Interfaces:
AktMessageInterface, com.hp.hpl.mesa.rdf.jena.model.Model, com.hp.hpl.mesa.rdf.jena.model.ModelCon, com.hp.hpl.mesa.rdf.jena.common.ModelI, com.hp.hpl.mesa.rdf.jena.model.RDFReaderF, com.hp.hpl.mesa.rdf.jena.model.RDFWriterF
Direct Known Subclasses:
RDFFipaMessage

public class RDFAktMessage
extends com.hp.hpl.mesa.rdf.jena.mem.ModelMem
implements AktMessageInterface


Field Summary
 
Fields inherited from class com.hp.hpl.mesa.rdf.jena.common.ModelCom
readerFactory, store, writerFactory
 
Constructor Summary
RDFAktMessage()
           
RDFAktMessage(java.lang.String message_to_parse)
           
RDFAktMessage(java.lang.String sender, java.lang.String receiver, java.lang.String simple_content)
           
RDFAktMessage(java.net.URL sender, java.net.URL receiver, java.lang.String simple_content)
           
 
Method Summary
 com.hp.hpl.mesa.rdf.jena.model.Resource get_container()
           
 com.hp.hpl.mesa.rdf.jena.model.Resource get_content()
           
 com.hp.hpl.mesa.rdf.jena.model.Resource get_header()
           
 java.lang.String get_receiver()
           
 java.lang.String get_sender()
           
 java.lang.String get_simple_message()
           
protected  int map_month(int calendar_month_value)
          FROM ORIGINAL AKTBUS CODE Maps Calendar's month value into 1-12
 void pretty_write(java.io.Writer out)
           
 void send()
          Send an AktMessage with blocking, using specified receiver URI in the AktMessage object.
 void send(int timeout)
          Send to the receiver as specified in the AktMessage, with timeout.
 void send(java.net.URL receiver_uri, int timeout)
          Sends an AktMessage to a certain recipient.
 void set_receiver(java.lang.String receiver)
           
 void set_receiver(java.net.URL receiver)
           
 void set_sender(java.lang.String sender)
           
 void set_sender(java.net.URL sender)
           
 void set_simple_message(java.lang.String message)
           
 void ugly_write(java.io.Writer out)
           
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.mem.ModelMem
difference, intersection, query, supportsSetOperations, supportsTransactions, union
 
Methods inherited from class com.hp.hpl.mesa.rdf.jena.common.ModelCom
abort, add, add, add, add, add, add, add, add, add, add, add, add, add, add, begin, close, commit, containerContains, containerIndexOf, containerSize, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, convert, convert, convert, createAlt, createAlt, createBag, createBag, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createProperty, createProperty, createResource, createResource, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, equals, getAlt, getAlt, getBag, getBag, getProperty, getProperty, getProperty, getReader, getReader, getResource, getResource, getSeq, getSeq, getWriter, getWriter, independent, isReified, listContainerMembers, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, read, read, read, read, remove, remove, remove, setReaderClassName, setWriterClassName, size, write, write, write
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.Model
abort, add, add, add, begin, close, commit, contains, contains, contains, containsAll, containsAll, containsAny, containsAny, createLiteral, createLiteral, createProperty, createResource, createResource, createStatement, equals, getProperty, getProperty, getResource, independent, isReified, listNameSpaces, listObjects, listObjectsOfProperty, listObjectsOfProperty, listReifiedStatements, listStatements, listStatements, listSubjects, listSubjectsWithProperty, listSubjectsWithProperty, read, read, read, read, remove, size, write, write, write
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.ModelCon
add, add, add, add, add, add, add, add, add, add, add, contains, contains, contains, contains, contains, contains, contains, contains, createAlt, createAlt, createBag, createBag, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createLiteral, createProperty, createResource, createResource, createResource, createResource, createSeq, createSeq, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, createStatement, getAlt, getAlt, getBag, getBag, getProperty, getResource, getSeq, getSeq, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, listSubjectsWithProperty, remove, remove
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.RDFReaderF
getReader, getReader, setReaderClassName
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.model.RDFWriterF
getWriter, getWriter, setWriterClassName
 
Methods inherited from interface com.hp.hpl.mesa.rdf.jena.common.ModelI
containerContains, containerIndexOf, containerSize, convert, convert, convert, listContainerMembers
 

Constructor Detail

RDFAktMessage

public RDFAktMessage()
              throws com.hp.hpl.mesa.rdf.jena.model.RDFException,
                     java.lang.Exception

RDFAktMessage

public RDFAktMessage(java.lang.String message_to_parse)
              throws com.hp.hpl.mesa.rdf.jena.model.RDFException,
                     java.lang.Exception

RDFAktMessage

public RDFAktMessage(java.net.URL sender,
                     java.net.URL receiver,
                     java.lang.String simple_content)
              throws com.hp.hpl.mesa.rdf.jena.model.RDFException,
                     java.lang.Exception

RDFAktMessage

public RDFAktMessage(java.lang.String sender,
                     java.lang.String receiver,
                     java.lang.String simple_content)
              throws com.hp.hpl.mesa.rdf.jena.model.RDFException,
                     java.lang.Exception
Method Detail

get_receiver

public java.lang.String get_receiver()
Specified by:
get_receiver in interface AktMessageInterface

get_sender

public java.lang.String get_sender()
Specified by:
get_sender in interface AktMessageInterface

get_simple_message

public java.lang.String get_simple_message()
Specified by:
get_simple_message in interface AktMessageInterface

get_container

public com.hp.hpl.mesa.rdf.jena.model.Resource get_container()
                                                      throws com.hp.hpl.mesa.rdf.jena.model.RDFException
com.hp.hpl.mesa.rdf.jena.model.RDFException

get_header

public com.hp.hpl.mesa.rdf.jena.model.Resource get_header()
                                                   throws com.hp.hpl.mesa.rdf.jena.model.RDFException
com.hp.hpl.mesa.rdf.jena.model.RDFException

get_content

public com.hp.hpl.mesa.rdf.jena.model.Resource get_content()
                                                    throws com.hp.hpl.mesa.rdf.jena.model.RDFException
com.hp.hpl.mesa.rdf.jena.model.RDFException

set_receiver

public void set_receiver(java.lang.String receiver)

set_receiver

public void set_receiver(java.net.URL receiver)

set_sender

public void set_sender(java.lang.String sender)

set_sender

public void set_sender(java.net.URL sender)

set_simple_message

public void set_simple_message(java.lang.String message)

send

public void send()
          throws java.lang.Exception,
                 java.io.IOException,
                 java.io.InterruptedIOException
Send an AktMessage with blocking, using specified receiver URI in the AktMessage object.

Specified by:
send in interface AktMessageInterface
Throws:
java.lang.Exception - When a general error occurs.
java.io.IOException - When I/O-related error occurs.
java.io.InterruptedIOException - When a timeout occurs.

send

public void send(int timeout)
          throws java.lang.Exception,
                 java.io.IOException,
                 java.io.InterruptedIOException
Send to the receiver as specified in the AktMessage, with timeout. A receiver must be specified in the AktMessage.

Specified by:
send in interface AktMessageInterface
Parameters:
timeout - The timeout (in second) on the connection to the receiver.
Throws:
java.lang.Exception - When a general error occurs.
java.io.IOException - When I/O-related error occurs.
java.io.InterruptedIOException - When a timeout occurs.

send

public void send(java.net.URL receiver_uri,
                 int timeout)
          throws java.lang.Exception,
                 java.io.IOException,
                 java.io.InterruptedIOException
Sends an AktMessage to a certain recipient. A receiver URI must be specified in the AktMessage, although the two do not have to be the same.

Specified by:
send in interface AktMessageInterface
Parameters:
receiver_uri - The URL of the receiver.
timeout - The timeout value waiting for a response from the other side, in second.
Throws:
java.lang.Exception - When sending fails. i.e. reply is not OK.
java.io.IOException - When I/O-related error occurs.
java.io.InterruptedIOException - When a timeout occurs.

ugly_write

public void ugly_write(java.io.Writer out)
Specified by:
ugly_write in interface AktMessageInterface

pretty_write

public void pretty_write(java.io.Writer out)

map_month

protected int map_month(int calendar_month_value)
                 throws java.lang.Exception
FROM ORIGINAL AKTBUS CODE Maps Calendar's month value into 1-12

Parameters:
calendar_month_value - The integer value from Calendar.MONTH.
Returns:
An integer 1-12.
java.lang.Exception