use of org.apache.cxf.management.annotation.ManagedOperationParameters in project cxf by apache.
the class ManagedRMEndpoint method terminateDestinationSequence.
@ManagedOperation(description = "Terminate Destination Sequence")
@ManagedOperationParameters({ @ManagedOperationParameter(name = "sequenceId", description = "The sequence identifier") })
public void terminateDestinationSequence(String sid) throws JMException {
DestinationSequence ds = getDestinationSeq(sid);
if (null == ds) {
throw new JMException("no destination sequence");
}
Proxy proxy = endpoint.getProxy();
try {
proxy.terminate(ds);
ds.getDestination().removeSequence(ds);
} catch (RMException e) {
throw new JMException("Error terminating sequence: " + e.getMessage());
}
}
use of org.apache.cxf.management.annotation.ManagedOperationParameters in project cxf by apache.
the class ManagedRMEndpoint method terminateSourceSequence.
@ManagedOperation(description = "Terminate Source Sequence")
@ManagedOperationParameters({ @ManagedOperationParameter(name = "sequenceId", description = "The sequence identifier") })
public void terminateSourceSequence(String sid) throws JMException {
SourceSequence ss = getSourceSeq(sid);
if (null == ss) {
throw new JMException("no source sequence");
}
Proxy proxy = endpoint.getProxy();
try {
proxy.terminate(ss);
ss.getSource().removeSequence(ss);
} catch (RMException e) {
throw new JMException("Error terminating sequence: " + e.getMessage());
}
}
use of org.apache.cxf.management.annotation.ManagedOperationParameters in project cxf by apache.
the class ModelMBeanAssembler method getManagedOperationParameters.
public ManagedOperationParameter[] getManagedOperationParameters(Method method) {
ManagedOperationParameters params = method.getAnnotation(ManagedOperationParameters.class);
ManagedOperationParameter[] result = null;
if (params == null) {
result = new ManagedOperationParameter[0];
} else {
result = params.value();
}
return result;
}
use of org.apache.cxf.management.annotation.ManagedOperationParameters in project cxf by apache.
the class ManagedRMEndpoint method getSourceSequenceAcknowledgedRange.
@ManagedOperation(description = "Source Sequence Acknowledged Range")
@ManagedOperationParameters({ @ManagedOperationParameter(name = "sequenceId", description = "The sequence identifier") })
public Long[] getSourceSequenceAcknowledgedRange(String sid) {
SourceSequence ss = getSourceSeq(sid);
if (null == ss) {
throw new IllegalArgumentException("no sequence");
}
List<Long> list = new ArrayList<>();
for (AcknowledgementRange r : ss.getAcknowledgement().getAcknowledgementRange()) {
list.add(r.getLower());
list.add(r.getUpper());
}
return list.toArray(new Long[list.size()]);
}
use of org.apache.cxf.management.annotation.ManagedOperationParameters in project cxf by apache.
the class ManagedRMEndpoint method getDestinationSequenceAcknowledgedRange.
@ManagedOperation(description = "Destination Sequence Acknowledged Range")
@ManagedOperationParameters({ @ManagedOperationParameter(name = "sequenceId", description = "The sequence identifier") })
public Long[] getDestinationSequenceAcknowledgedRange(String sid) {
DestinationSequence ds = getDestinationSeq(sid);
if (null == ds) {
throw new IllegalArgumentException("no sequence");
}
List<Long> list = new ArrayList<>();
for (AcknowledgementRange r : ds.getAcknowledgment().getAcknowledgementRange()) {
list.add(r.getLower());
list.add(r.getUpper());
}
return list.toArray(new Long[list.size()]);
}
Aggregations