Search in sources :

Example 1 with IMQDirectService

use of com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService in project openmq by eclipse-ee4j.

the class BrokerInstanceImpl method getJMSService.

private JMSService getJMSService(String serviceName) throws IllegalStateException {
    ServiceManager sm = Globals.getServiceManager();
    Service svc;
    IMQService imqSvc;
    IMQDirectService imqDirectSvc;
    if (sm == null) {
        return (null);
    }
    svc = sm.getService(serviceName);
    if (svc == null) {
        return (null);
    }
    if (!(svc instanceof IMQService)) {
        return (null);
    }
    imqSvc = (IMQService) svc;
    if (!imqSvc.isDirect()) {
        return (null);
    }
    if (!(imqSvc instanceof IMQDirectService)) {
        return (null);
    }
    imqDirectSvc = (IMQDirectService) imqSvc;
    return imqDirectSvc.getJMSService();
}
Also used : IMQDirectService(com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService) ServiceManager(com.sun.messaging.jmq.jmsserver.service.ServiceManager) IMQService(com.sun.messaging.jmq.jmsserver.service.imq.IMQService) JMSService(com.sun.messaging.jmq.jmsservice.JMSService) IMQDirectService(com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService) Service(com.sun.messaging.jmq.jmsserver.service.Service) IMQService(com.sun.messaging.jmq.jmsserver.service.imq.IMQService)

Example 2 with IMQDirectService

use of com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService in project openmq by eclipse-ee4j.

the class JMSRA_BrokerProcess method getJMSService.

/**
 * Return the named JMS Service that supports 'DIRECT' in-JVM Java EEJMS clients.
 *
 * @param serviceName The name of the service to return
 *
 * @throws IllegalStateException if the broker is already stopped
 */
@Override
public JMSService getJMSService(String serviceName) throws IllegalStateException {
    ServiceManager sm = Globals.getServiceManager();
    Service svc;
    IMQService imqSvc;
    IMQDirectService imqDirectSvc;
    if (sm == null) {
        return (null);
    }
    svc = sm.getService(serviceName);
    if (svc == null) {
        return (null);
    }
    if (!(svc instanceof IMQService)) {
        return (null);
    }
    imqSvc = (IMQService) svc;
    if (!imqSvc.isDirect()) {
        return (null);
    }
    if (!(imqSvc instanceof IMQDirectService)) {
        return (null);
    }
    imqDirectSvc = (IMQDirectService) imqSvc;
    return imqDirectSvc.getJMSService();
}
Also used : IMQDirectService(com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService) ServiceManager(com.sun.messaging.jmq.jmsserver.service.ServiceManager) JMSService(com.sun.messaging.jmq.jmsservice.JMSService) IMQDirectService(com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService) Service(com.sun.messaging.jmq.jmsserver.service.Service) IMQService(com.sun.messaging.jmq.jmsserver.service.imq.IMQService) IMQService(com.sun.messaging.jmq.jmsserver.service.imq.IMQService)

Aggregations

Service (com.sun.messaging.jmq.jmsserver.service.Service)2 ServiceManager (com.sun.messaging.jmq.jmsserver.service.ServiceManager)2 IMQDirectService (com.sun.messaging.jmq.jmsserver.service.imq.IMQDirectService)2 IMQService (com.sun.messaging.jmq.jmsserver.service.imq.IMQService)2 JMSService (com.sun.messaging.jmq.jmsservice.JMSService)2