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, EZBComponent, EZBSmartComponent

public class SmartClientEndPointComponent
extends java.lang.Object
implements 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
 java.lang.ClassLoader getClassLoader()
          The class loader to use for the resource lookup.
 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 setClassLoader(java.lang.ClassLoader classLoader)
          Sets the class loader to use for the resource lookup.
 void setPortNumber(int portNumber)
          Sets the port number of the smart endpoint.
 void setRegistryComponent(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 EZBComponentException
Init method.
This method is called before the start method.

Specified by:
init in interface EZBComponent
Throws:
EZBComponentException - if the initialization has failed.

start

public void start()
           throws EZBComponentException
Start method.
This method is called after the init method.

Specified by:
start in interface EZBComponent
Throws:
EZBComponentException - if the start has failed.

stop

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

Specified by:
stop in interface EZBComponent
Throws:
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(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 EZBSmartComponent
Returns:
the port number

setClassLoader

public void setClassLoader(java.lang.ClassLoader classLoader)
Sets the class loader to use for the resource lookup.

Parameters:
classLoader - the class loader to use for the resource lookup.

getClassLoader

public java.lang.ClassLoader getClassLoader()
The class loader to use for the resource lookup. If null, Thread's context class loader is used.

Returns:
the class loader to use for the resource lookup.


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