org.jboss.ha.framework.interfaces
Interface HAService<E extends EventObject>

Type Parameters:
E - type of event generated by this service
All Superinterfaces:
EventListener, HAServiceKeyProvider
All Known Subinterfaces:
HASingleton<E>
All Known Implementing Classes:
HAServiceImpl, HASingletonImpl

public interface HAService<E extends EventObject>
extends HAServiceKeyProvider, EventListener<E>

Basic interface for clustered services

Author:
Paul Ferraro

Method Summary
 void create()
           
 void destroy()
           
 String getServiceHAName()
           
 boolean isRegisterThreadContextClassLoader()
          Test whether the thread context classloader should be used in RPC calls.
 void setHAPartition(HAPartition partition)
           
 void setRegisterThreadContextClassLoader(boolean register)
          Sets a flag specifying whether the calling thread's context classloader should be used when making RPC calls.
 void setServiceHAName(String name)
           
 void start()
           
 void stop()
           
 
Methods inherited from interface org.jboss.ha.framework.interfaces.HAServiceKeyProvider
getHAPartition, getHAServiceKey
 
Methods inherited from interface org.jboss.ha.framework.interfaces.EventListener
handleEvent
 

Method Detail

getServiceHAName

String getServiceHAName()

setHAPartition

void setHAPartition(HAPartition partition)

setServiceHAName

void setServiceHAName(String name)

isRegisterThreadContextClassLoader

boolean isRegisterThreadContextClassLoader()
Test whether the thread context classloader should be used in RPC calls.

Returns:
whether the thread context classloader should be used in RPC calls.

setRegisterThreadContextClassLoader

void setRegisterThreadContextClassLoader(boolean register)
Sets a flag specifying whether the calling thread's context classloader should be used when making RPC calls. This flag must be set before the RPC handler is registered in startService(). The default value is false. This would typically be used in conjunction with a scoped classloader.

Parameters:
register - whether to use the thread context classloader when registering the service's RPC handler.

create

void create()
            throws Exception
Throws:
Exception

start

void start()
           throws Exception
Throws:
Exception

stop

void stop()

destroy

void destroy()


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.