de.willuhn.jameica.webadmin.server
Class RestServiceImpl

java.lang.Object
  extended by de.willuhn.jameica.webadmin.server.RestServiceImpl
All Implemented Interfaces:
de.willuhn.datasource.Service, RestService, java.rmi.Remote

public class RestServiceImpl
extends java.lang.Object
implements RestService

Implementierung des REST-Services.


Constructor Summary
RestServiceImpl()
           
 
Method Summary
 java.lang.String getName()
           
 void handleRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Verarbeitet einen Request.
 boolean isStartable()
           
 boolean isStarted()
           
 void register(java.lang.Object bean)
          Registriert eine Bean.
 void start()
           
 void stop(boolean arg0)
           
 void unregister(java.lang.Object bean)
          Deregistriert die Bean.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestServiceImpl

public RestServiceImpl()
Method Detail

handleRequest

public void handleRequest(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws java.io.IOException
Description copied from interface: RestService
Verarbeitet einen Request.

Specified by:
handleRequest in interface RestService
Throws:
java.io.IOException
See Also:
RestService.handleRequest(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)

register

public void register(java.lang.Object bean)
              throws java.rmi.RemoteException
Description copied from interface: RestService
Registriert eine Bean.

Specified by:
register in interface RestService
Parameters:
bean - die zu registrierende Bean. Die Bean muss einen parameterlosen Konstruktor mit public-Modifier besitzen und mindestens eine Annotation "Path("/gewuenschte/url")" besitzen, um korrekt registriert zu werden.
Throws:
java.rmi.RemoteException
See Also:
RestService.register(java.lang.Object)

unregister

public void unregister(java.lang.Object bean)
                throws java.rmi.RemoteException
Description copied from interface: RestService
Deregistriert die Bean.

Specified by:
unregister in interface RestService
Parameters:
bean - die Bean.
Throws:
java.rmi.RemoteException
See Also:
RestService.unregister(java.lang.Object)

getName

public java.lang.String getName()
                         throws java.rmi.RemoteException
Specified by:
getName in interface de.willuhn.datasource.Service
Throws:
java.rmi.RemoteException
See Also:
Service.getName()

isStartable

public boolean isStartable()
                    throws java.rmi.RemoteException
Specified by:
isStartable in interface de.willuhn.datasource.Service
Throws:
java.rmi.RemoteException
See Also:
Service.isStartable()

isStarted

public boolean isStarted()
                  throws java.rmi.RemoteException
Specified by:
isStarted in interface de.willuhn.datasource.Service
Throws:
java.rmi.RemoteException
See Also:
Service.isStarted()

start

public void start()
           throws java.rmi.RemoteException
Specified by:
start in interface de.willuhn.datasource.Service
Throws:
java.rmi.RemoteException
See Also:
Service.start()

stop

public void stop(boolean arg0)
          throws java.rmi.RemoteException
Specified by:
stop in interface de.willuhn.datasource.Service
Throws:
java.rmi.RemoteException
See Also:
Service.stop(boolean)