org.ow2.easybeans.component.smartclient.server
Class SmartClientEndPointComponent

java.lang.Object
  extended by org.ow2.easybeans.component.smartclient.server.SmartClientEndPointComponent
All Implemented Interfaces:
java.lang.Runnable, org.ow2.easybeans.component.api.EZBComponent, org.ow2.easybeans.component.itf.EZBSmartComponent

public class SmartClientEndPointComponent
extends java.lang.Object
implements org.ow2.easybeans.component.itf.EZBSmartComponent, java.lang.Runnable

This endpoint receives the request from clients, handle them and send an answer.
For example, it send the bytecode for a given class.

Author:
Florent Benoit

Constructor Summary
SmartClientEndPointComponent()
           
 
Method Summary
 int getPortNumber()
          Gets the port number of the smart endpoint.
 void handleSelectors()
          Infinite loop (until the end of the component) that handle the selectors.
 void init()
          Init method.
This method is called before the start method.
 void run()
          Launch the thread looking at the selectors.
 void setPortNumber(int portNumber)
          Sets the port number of the smart endpoint.
 void setRegistryComponent(org.ow2.easybeans.component.itf.RegistryComponent registryComponent)
          Sets the registry component.
 void start()
          Start method.
This method is called after the init method.
 void stop()
          Stop method.
This method is called when component needs to be stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SmartClientEndPointComponent

public SmartClientEndPointComponent()
Method Detail

init

public void init()
          throws org.ow2.easybeans.component.api.EZBComponentException
Init method.
This method is called before the start method.

Specified by:
init in interface org.ow2.easybeans.component.api.EZBComponent
Throws:
org.ow2.easybeans.component.api.EZBComponentException - if the initialization has failed.

start

public void start()
           throws org.ow2.easybeans.component.api.EZBComponentException
Start method.
This method is called after the init method.

Specified by:
start in interface org.ow2.easybeans.component.api.EZBComponent
Throws:
org.ow2.easybeans.component.api.EZBComponentException - if the start has failed.

stop

public void stop()
          throws org.ow2.easybeans.component.api.EZBComponentException
Stop method.
This method is called when component needs to be stopped.

Specified by:
stop in interface org.ow2.easybeans.component.api.EZBComponent
Throws:
org.ow2.easybeans.component.api.EZBComponentException - if the stop is failing.

handleSelectors

public void handleSelectors()
Infinite loop (until the end of the component) that handle the selectors.


run

public void run()
Launch the thread looking at the selectors.

Specified by:
run in interface java.lang.Runnable

setPortNumber

public void setPortNumber(int portNumber)
Sets the port number of the smart endpoint.

Parameters:
portNumber - the port for listening

setRegistryComponent

public void setRegistryComponent(org.ow2.easybeans.component.itf.RegistryComponent registryComponent)
Sets the registry component.

Parameters:
registryComponent - the given component.

getPortNumber

public int getPortNumber()
Gets the port number of the smart endpoint.

Specified by:
getPortNumber in interface org.ow2.easybeans.component.itf.EZBSmartComponent
Returns:
the port number


Copyright © 2006-2008 OW2 Consortium. All Rights Reserved.