org.objectweb.perseus.distribution.jgroups

Class JGroupsServiceManager

Implemented Interfaces:
BindingController, DistResServiceManager, LifeCycleController

public class JGroupsServiceManager
extends java.lang.Object
implements DistResServiceManager, BindingController, LifeCycleController

Copyright (C) 2003-2004 - France Telecom R&D This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Release: 1.0 Authors: Olivier Lobry (olivier.lobry@rd.francetelecom.com)

Field Summary

static String
SERIALIZER_BINDING
protected String
state

Constructor Summary

JGroupsServiceManager()

Method Summary

void
bindFc(String s, Object o)
DistResControllerService
getControllerService(Object nodeId)
Returns the controller service of a given local node
DistResCoordinatorService
getCoordinatorService(Object nodeId)
Returns the coordinator service of a given local node
boolean
getDeserializeAtCoordinator()
String
getFcState()
Set
getLocalNodes()
Get the set of existing local nodes
JGroupsService
getService(Object nodeId)
DistResUserService
getUserService(Object nodeId)
Returns the user service of a given local node
String[]
listFc()
Object
lookupFc(String s)
Serializable
newLocalNode(DistResCoordinatorFactory drcf)
Creates a new (virtual) node on which resources will be used and managed.
void
removeAllLocalNodes()
Removes all existing local nodes.
void
removeLocalNode(Object nodeId)
Removes a existing local node.
void
setDeserializeAtCoordinator(boolean value)
void
startFc()
void
stopFc()
void
stopLocalNode(Object nodeId)
void
unbindFc(String s)

Field Details

SERIALIZER_BINDING

public static final String SERIALIZER_BINDING


state

protected String state

Constructor Details

JGroupsServiceManager

public JGroupsServiceManager()

Method Details

bindFc

public void bindFc(String s,
                   Object o)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException


getControllerService

public DistResControllerService getControllerService(Object nodeId)
Returns the controller service of a given local node
Specified by:
getControllerService in interface DistResServiceManager

Parameters:
nodeId - the id of the related local node

Returns:
the controller service of a given local node


getCoordinatorService

public DistResCoordinatorService getCoordinatorService(Object nodeId)
Returns the coordinator service of a given local node
Specified by:
getCoordinatorService in interface DistResServiceManager

Parameters:
nodeId - the id of the related local node

Returns:
the controller service of a given local node


getDeserializeAtCoordinator

public boolean getDeserializeAtCoordinator()
Specified by:
getDeserializeAtCoordinator in interface DistResServiceManager


getFcState

public String getFcState()


getLocalNodes

public Set getLocalNodes()
Get the set of existing local nodes
Specified by:
getLocalNodes in interface DistResServiceManager

Returns:
the set of existing local nodes


getService

public JGroupsService getService(Object nodeId)


getUserService

public DistResUserService getUserService(Object nodeId)
Returns the user service of a given local node
Specified by:
getUserService in interface DistResServiceManager

Parameters:
nodeId - the id of the related local node

Returns:
the user service of a given local node


listFc

public String[] listFc()


lookupFc

public Object lookupFc(String s)
            throws NoSuchInterfaceException


newLocalNode

public Serializable newLocalNode(DistResCoordinatorFactory drcf)
Creates a new (virtual) node on which resources will be used and managed. As node are virtual, one can create multiple nodes inside a single JVM.
Specified by:
newLocalNode in interface DistResServiceManager

Parameters:
drcf - the coordinator factory to use when coordinator creation is required

Returns:
the id of the created node


removeAllLocalNodes

public void removeAllLocalNodes()
Removes all existing local nodes.
Specified by:
removeAllLocalNodes in interface DistResServiceManager


removeLocalNode

public void removeLocalNode(Object nodeId)
Removes a existing local node.
Specified by:
removeLocalNode in interface DistResServiceManager

Parameters:
nodeId -


setDeserializeAtCoordinator

public void setDeserializeAtCoordinator(boolean value)
Specified by:
setDeserializeAtCoordinator in interface DistResServiceManager


startFc

public void startFc()
            throws IllegalLifeCycleException


stopFc

public void stopFc()
            throws IllegalLifeCycleException


stopLocalNode

public void stopLocalNode(Object nodeId)


unbindFc

public void unbindFc(String s)
            throws NoSuchInterfaceException,
                   IllegalBindingException,
                   IllegalLifeCycleException


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.