|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
de.fhg.igd.semoa.web.HttpInGate
TO DO: the clean up process, the documentation, agents passed in a file.
Nested Class Summary |
Nested classes inherited from class de.fhg.igd.semoa.server.AgentGateway |
AgentGateway.In, AgentGateway.Out |
Field Summary | |
static int |
BUF_SIZE
The buffer size. |
private static String[] |
DEPEND_
The dependencies to other objects in the global Environment . |
private boolean |
enabled_
Enable/disable the gate. |
private InGate |
ingate_
The private reference to the ingate. |
private long |
lastFetch_
The time of the last fetch of the ingate. |
private Object |
lock_
The lock object that is needed when getting the ingate. |
static long |
MAX_SIZE
The maximum size of an Agent in bytes (initial value). |
private long |
maxSize_
The maximum size of an agent (current value). |
static String |
MIME_TYPE
The mimetype that an agent has to be that it is accepted by the ingate. |
static String |
PROTOCOL
The protocol name. |
Fields inherited from class javax.servlet.http.HttpServlet |
|
Fields inherited from class javax.servlet.GenericServlet |
|
Constructor Summary | |
HttpInGate()
Creates a new instance. |
Method Summary | |
protected Ticket |
createTicket(javax.servlet.http.HttpServletRequest request)
Creates a return ticket. |
void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
Writes a simple page that allows the user to send an agent via web browser. |
void |
doPost(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res)
This method receives agents from the Outgate. |
protected InGate |
getInGate()
Returns a reference to the ingate. |
long |
getMaximumSize()
Returns the maximum size an agent is allowed to be. |
String |
getServletInfo()
|
boolean |
isEnabled()
|
URL |
localURL()
Returns the URL of this server or null if it cannot be retrieved. |
String |
protocol()
|
void |
setEnabled(boolean on)
Enables and disables this gateway temporarily. |
void |
setMaximumSize(long size)
Sets the maximum size of an acceptable agent. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String MIME_TYPE
public static final long MAX_SIZE
public static final int BUF_SIZE
public static final String PROTOCOL
private static final String[] DEPEND_
Environment
.
private long lastFetch_
private InGate ingate_
private long maxSize_
private Object lock_
private boolean enabled_
Constructor Detail |
public HttpInGate()
Method Detail |
public long getMaximumSize()
getMaximumSize
in interface AgentGateway.In
public void setMaximumSize(long size)
setMaximumSize
in interface AgentGateway.In
size
- the new size.public URL localURL()
localURL
in interface AgentGateway.In
public void setEnabled(boolean on)
setEnabled
in interface AgentGateway
on
- true
if the gateway shall be enabled
and false
otherwise.public boolean isEnabled()
isEnabled
in interface AgentGateway
true
if this gateway is enabled.public String protocol()
protocol
in interface AgentGateway
protected InGate getInGate()
protected Ticket createTicket(javax.servlet.http.HttpServletRequest request)
FIX ME: port
request
- the HttpServletRequest passed
to the servlet.
public void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public void doPost(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res) throws javax.servlet.ServletException, IOException
javax.servlet.ServletException
IOException
public String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |