public class DestinationMSF extends Object implements org.osgi.service.cm.ManagedServiceFactory
<configadmin> <factory-configuration pid="org.objectweb.joram.client.osgi.DestinationMSF"> <property name="adminWrapper">ra1</property> <property name="serverId">0</property> <property name="name">queue</property> <property name="className">org.objectweb.joram.mom.dest.Queue</property> <!-- properties --> <property name="freeReading">true</property> <property name="writers">user1 user2</property> <property name="jndiName">queue</property> </factory-configuration> </configadmin>
Modifier and Type | Field and Description |
---|---|
static String |
ADMIN_HOST |
static String |
ADMIN_PORT |
static String |
ADMIN_USERNAME |
static String |
ADMIN_WRAPPER |
private org.osgi.framework.BundleContext |
bundleContext |
static String |
CLASSNAME |
private HashMap<String,Destination> |
destinations |
static String |
DMQ |
static String |
DMQ_SID |
static String |
FREEREADING |
static String |
FREEWRITING |
private JndiHelper |
jndiHelper |
static String |
JNDINAME |
private HashMap<String,String> |
jndiNames |
static org.objectweb.util.monolog.api.Logger |
logmon |
static String |
NAME |
static String |
NB_MAXMSG |
static String |
READERS |
private org.osgi.framework.ServiceRegistration |
registration |
static String |
SERVERID |
static String |
THRESHOLD |
static String |
WRITERS |
Constructor and Description |
---|
DestinationMSF(org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
private Destination |
createDestination(AdminItf wrapper,
int serverId,
String name,
String className,
Properties props) |
void |
deleted(String pid) |
void |
doStop() |
void |
doUpdated(String pid,
Dictionary properties)
Create the destination
|
String |
getName() |
private User |
getUser(AdminItf wrapper,
String user,
int serverId) |
private boolean |
isSet(String value) |
private void |
setDestinationDMQ(AdminItf wrapper,
Destination dest,
String dmq,
int dmqSid) |
private void |
setQueueThreshold(Queue queue,
String thresholdStr,
String nbMaxMsgStr) |
private void |
setRight(AdminItf wrapper,
Destination dest,
int serverId,
boolean freeReading,
boolean freeWriting,
String readers,
String writers) |
void |
updated(String pid,
Dictionary properties) |
public static final org.objectweb.util.monolog.api.Logger logmon
public static final String ADMIN_WRAPPER
public static final String ADMIN_HOST
public static final String ADMIN_PORT
public static final String ADMIN_USERNAME
public static final String NAME
public static final String SERVERID
public static final String CLASSNAME
public static final String FREEREADING
public static final String FREEWRITING
public static final String READERS
public static final String WRITERS
public static final String THRESHOLD
public static final String NB_MAXMSG
public static final String JNDINAME
public static final String DMQ
public static final String DMQ_SID
private org.osgi.framework.BundleContext bundleContext
private org.osgi.framework.ServiceRegistration registration
private HashMap<String,Destination> destinations
private JndiHelper jndiHelper
public DestinationMSF(org.osgi.framework.BundleContext bundleContext)
private final boolean isSet(String value)
private Destination createDestination(AdminItf wrapper, int serverId, String name, String className, Properties props) throws ConnectException, AdminException
ConnectException
AdminException
private User getUser(AdminItf wrapper, String user, int serverId) throws ConnectException, AdminException
ConnectException
AdminException
private void setRight(AdminItf wrapper, Destination dest, int serverId, boolean freeReading, boolean freeWriting, String readers, String writers) throws ConnectException, AdminException
ConnectException
AdminException
private void setQueueThreshold(Queue queue, String thresholdStr, String nbMaxMsgStr) throws ConnectException, AdminException
ConnectException
AdminException
private void setDestinationDMQ(AdminItf wrapper, Destination dest, String dmq, int dmqSid) throws ConnectException, AdminException
ConnectException
AdminException
public void doStop()
public void doUpdated(String pid, Dictionary properties)
pid
- the pidproperties
- the destination propertiespublic String getName()
getName
in interface org.osgi.service.cm.ManagedServiceFactory
public void updated(String pid, Dictionary properties) throws org.osgi.service.cm.ConfigurationException
updated
in interface org.osgi.service.cm.ManagedServiceFactory
org.osgi.service.cm.ConfigurationException
public void deleted(String pid)
deleted
in interface org.osgi.service.cm.ManagedServiceFactory
Copyright © 2013 ScalAgent D.T.. All Rights Reserved.