zeus.actors.intrays
Class FIPA_2000_HTTP_Server

java.lang.Object
  extended byjava.lang.Thread
      extended byzeus.actors.Server
          extended byzeus.actors.intrays.FIPA_2000_HTTP_Server
All Implemented Interfaces:
InTray, java.lang.Runnable

public class FIPA_2000_HTTP_Server
extends Server
implements InTray

This is an extention of the Server class which provides an "InTray" service for HTTP transports. It will read messages from a http connection and will then call a the handle method in the FIPA_2000_Handler object that was used to init it.

Since:
1.1
Author:
Simon Thompson

Field Summary
protected  AgentContext context
           
private  java.io.File file
           
private  FIPA_2000_Handler handler
           
private  java.lang.String host
           
private  java.io.FileWriter log
           
private  Queue msgQ
           
private  java.lang.String name
           
private  ZeusParser parser
           
private  java.lang.String port
           
 
Fields inherited from class zeus.actors.Server
address, connection_count, DEFAULT_PORT_MAX, DEFAULT_PORT_MIN, inMail, listenSocket, MAX_CONNECTIONS, MAX_QUEUE_LENGTH, mbox, msgHandler, processing, timeout
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
FIPA_2000_HTTP_Server(FIPA_2000_Handler handler, java.lang.String host, java.lang.String port, java.lang.String name, java.lang.String threadId)
           
 
Method Summary
 void debug(java.lang.String str)
           
 java.lang.String getResponseAddress()
          returns http://host:port/name
static void main(java.lang.String[] argv)
          main method for testing only - not for user applications
 FIPAPerformative pop()
           
 void run()
          this is the method that gets stuff off the q and sends it to the handler for processing
 
Methods inherited from class zeus.actors.Server
finalize, getAddress, getAgentContext, lowerStatus, newMsg, normalStatus, stopProcessing, updateCount
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

context

protected AgentContext context

msgQ

private Queue msgQ

parser

private ZeusParser parser

handler

private FIPA_2000_Handler handler

host

private java.lang.String host

port

private java.lang.String port

name

private java.lang.String name

file

private java.io.File file

log

private java.io.FileWriter log
Constructor Detail

FIPA_2000_HTTP_Server

public FIPA_2000_HTTP_Server(FIPA_2000_Handler handler,
                             java.lang.String host,
                             java.lang.String port,
                             java.lang.String name,
                             java.lang.String threadId)
Method Detail

run

public void run()
this is the method that gets stuff off the q and sends it to the handler for processing

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class Server

pop

public FIPAPerformative pop()

getResponseAddress

public java.lang.String getResponseAddress()
returns http://host:port/name

Specified by:
getResponseAddress in interface InTray
Overrides:
getResponseAddress in class Server

main

public static void main(java.lang.String[] argv)
main method for testing only - not for user applications


debug

public void debug(java.lang.String str)
Overrides:
debug in class Server


Copyright © 2000-2003 BT Exact Technologies. All Rights Reserved.