rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
public InvalidInputException(Object o) { if (o instanceof InvalidInputException) { InvalidInputException iie = (InvalidInputException) o; errors = iie.errors; genericErrors = iie.genericErrors; } else if (o instanceof Map) { errors = (Map) o; } else if (o instanceof String[]) { String[] stringMap = (String[]) o; int le...
public InvalidInputException() { super();
public InvalidInputException(Object o) { if (o instanceof InvalidInputException) { InvalidInputException iie = (InvalidInputException) o; errors = iie.errors; genericErrors = iie.genericErrors; } else if (o instanceof Map) { errors = (Map) o; } else i...
new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 2.));
new TexturePaint(pattern2D, new Rectangle2D.Double(0., 0., 4., 4.));
static void fillMetalPattern2D(Graphics2D g2d, int x, int y, int w, int h, Color light, Color dark) { if (pattern2D == null || !darkColor.equals(dark) || !lightColor.equals(light)) initializePattern(light, dark); // Prepare the texture. TexturePaint texture = new T...
pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB);
pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_ARGB);
static void initializePattern(Color light, Color dark) { pattern2D = new BufferedImage(4, 4, BufferedImage.TYPE_INT_RGB); lightColor = light; darkColor = dark; Graphics g = pattern2D.getGraphics(); g.setColor(light); g.fillRect(0, 0, 1, 1); g.fillRect(2, 2, 1, 1); g.setColor(dark); g.fillR...
public JBossMessageProducer(ProducerDelegate delegate) {
public JBossMessageProducer(ProducerDelegate delegate, Destination destination) {
public JBossMessageProducer(ProducerDelegate delegate) { this.delegate = delegate; deliveryMode = DeliveryMode.PERSISTENT; isMessageIDDisabled = false; isTimestampDisabled = false; priority = 4; }
throw new NotYetImplementedException();
public void close() throws JMSException { throw new NotYetImplementedException(); }
protected void configure(Message m, int deliveryMode, int priority, long timeToLive)
protected void configure(Message m, int deliveryMode, int priority, long timeToLive, Destination dest)
protected void configure(Message m, int deliveryMode, int priority, long timeToLive) throws JMSException { m.setJMSDeliveryMode(deliveryMode); if (isTimestampDisabled) { m.setJMSTimestamp(0l); } else { m.setJMSTimestamp(System.currentTimeMillis()); } ...
m.setJMSDestination(dest);
protected void configure(Message m, int deliveryMode, int priority, long timeToLive) throws JMSException { m.setJMSDeliveryMode(deliveryMode); if (isTimestampDisabled) { m.setJMSTimestamp(0l); } else { m.setJMSTimestamp(System.currentTimeMillis()); } ...
throw new NotYetImplementedException();
return destination;
public Destination getDestination() throws JMSException { throw new NotYetImplementedException(); }
client.disconnect();
public synchronized Object invoke(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); if (trace) { log.trace("invoking " + methodName + " on server"); } SimpleMetaData md = mi.getMetaData(); md.addMetaD...
Border border = c.getCurrentStyle().getBorderWidth(c.getCtx());
BorderPropertySet border = c.getCurrentStyle().getBorder(c.getCtx());
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
int tx = (int)margin.left() + border.left + (int)padding.left(); int ty = (int)margin.top() + border.top + (int)padding.top();
int tx = (int)margin.left() + (int)border.left() + (int)padding.left(); int ty = (int)margin.top() + (int)border.top() + (int)padding.top();
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
c.shrinkExtents(tx + (int)margin.right() + border.right + (int)padding.right(), ty + (int)margin.bottom() + border.bottom + (int)padding.bottom());
c.shrinkExtents(tx + (int)margin.right() + (int)border.right() + (int)padding.right(), ty + (int)margin.bottom() + (int)border.bottom() + (int)padding.bottom());
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
tableBox.leftPadding = border.left + (int)padding.left();
tableBox.leftPadding = (int)border.left() + (int)padding.left();
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
tableBox.rightPadding = border.right + (int)margin.right();
tableBox.rightPadding = (int)border.right() + (int)margin.right();
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
tableBox.height = (int)margin.top() + border.top + (int)padding.top() + tableBox.height + (int)padding.bottom() + border.bottom + (int)margin.bottom();
tableBox.height = (int)margin.top() + (int)border.top() + (int)padding.top() + tableBox.height + (int)padding.bottom() + (int)border.bottom() + (int)margin.bottom();
public static Box layout(Context c, BlockBox outerBox, Content content) { boolean set_bfc = false; if (content instanceof TableContent) { // install a block formatting context for the body, // ie. if it's null. // set up the outtermost bfc if (c.getBlockForm...
Border border = c.getCurrentStyle().getBorderWidth(c.getCtx());
BorderPropertySet border = c.getCurrentStyle().getBorder(c.getCtx());
private static CellBox layoutCell(Context c, CellBox cell, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ...
cell.leftPadding = border.left + (int)padding.left(); cell.rightPadding = (int)padding.right() + border.right; int tx = border.left + (int)padding.left(); int ty = border.top + (int)padding.top();
cell.leftPadding = (int)border.left() + (int)padding.left(); cell.rightPadding = (int)padding.right() + (int)border.right(); int tx = (int)border.left() + (int)padding.left(); int ty = (int)border.top() + (int)padding.top();
private static CellBox layoutCell(Context c, CellBox cell, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ...
c.shrinkExtents(tx + border.right + (int)padding.right(), ty + border.bottom + (int)padding.bottom());
c.shrinkExtents(tx + (int)border.right() + (int)padding.right(), ty + (int)border.bottom() + (int)padding.bottom());
private static CellBox layoutCell(Context c, CellBox cell, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ...
cell.height = border.top + (int)padding.top() + cell.height + (int)padding.bottom() + border.bottom;
cell.height = (int)border.top() + (int)padding.top() + cell.height + (int)padding.bottom() + (int)border.bottom();
private static CellBox layoutCell(Context c, CellBox cell, Content content, boolean fixed, TableBox table, int col) { //OK, first set up the current style. All depends on this... CascadedStyle pushed = content.getStyle(); if (pushed != null) { c.pushStyle(pushed); } if ...
Border border = c.getCurrentStyle().getBorderWidth(c.getCtx());
BorderPropertySet border = c.getCurrentStyle().getBorder(c.getCtx());
private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca...
row.leftPadding = border.left; row.rightPadding = border.right;
row.leftPadding = (int)border.left(); row.rightPadding = (int)border.right();
private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca...
int tx = border.left; int ty = border.top;
int tx = (int)border.left(); int ty = (int)border.top();
private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca...
c.shrinkExtents(tx + border.right, ty + border.bottom);
c.shrinkExtents(tx + (int)border.right(), ty + (int)border.bottom());
private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca...
row.height = border.top + row.height + border.bottom;
row.height = (int)border.top() + row.height + (int)border.bottom();
private static RowBox layoutRow(Context c, TableRowContent tableRowContent, TableBox table, boolean fixed, int borderSpacingHorizontal, int borderSpacingVertical) { // copy the extents Rectangle oe = c.getExtents(); c.setExtents(new Rectangle(oe)); RowBox row = new RowBox(); Casca...
public ImageReaderWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, boolean supportsStandardStreamMetadataFormat, String nativeStreamMetadataFormatName, String nativeStreamMetadataFormatClassName, String[] extraStreamMetadataFormatNames, String[]...
public ImageReaderWriterSpi()
public ImageReaderWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, boolean supportsStandardStreamMetadataFormat, String nativeS...
super(vendorName, version); if (names == null || names.length == 0 || pluginClassName == null) throw new IllegalArgumentException(); this.names = names; this.suffixes = suffixes; this.MIMETypes = MIMETypes; this.pluginClassName = pluginClassName; this.supportsStandardStreamMetadataFormat = supportsStandardStreamMeta...
public ImageReaderWriterSpi(String vendorName, String version, String[] names, String[] suffixes, String[] MIMETypes, String pluginClassName, boolean supportsStandardStreamMetadataFormat, String nativeS...
public void paintComponent( Context c, Box box ) { u.p( "Custom components must override paintComponent" );
public void paintComponent(Context c, Box box) { U.p("Custom components must override paintComponent");
public void paintComponent( Context c, Box box ) { u.p( "Custom components must override paintComponent" ); }
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles) {
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles, LinkedList decorations) {
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles) { restyle = restyle || ib.restyle;//cascade it down ib.restyle = false;//reset int padX = 0; if (ib.pushstyles != null) { for (Iterator i = ib.pushstyles.it...
int rightMargin = ib.margin.right;
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles) { restyle = restyle || ib.restyle;//cascade it down ib.restyle = false;//reset int padX = 0; if (ib.pushstyles != null) { for (Iterator i = ib.pushstyles.it...
paintMargin(c, line, ib, padX, rightMargin, background_color); padX += rightMargin;
paintMargin(c, line, ib, padX, ib.margin.right, background_color); padX += ib.margin.right;
static void paintInline(Context c, InlineBox ib, int lx, int ly, LineBox line, boolean restyle, LinkedList pushedStyles) { restyle = restyle || ib.restyle;//cascade it down ib.restyle = false;//reset int padX = 0; if (ib.pushstyles != null) { for (Iterator i = ib.pushstyles.it...
paintLine(c, (LineBox) box.getChild(i), restyle, firstLineStyle);
paintLine(c, (LineBox) box.getChild(i), restyle, firstLineStyle, decorations);
static void paintInlineContext(Context c, Box box, boolean restyle) { //dummy style to make sure that text nodes don't get extra padding and such { c.pushStyle(CascadedStyle.emptyCascadedStyle); //BlockBox block = (BlockBox)box; // translate into local coords ...
static void paintLine(Context c, LineBox line, boolean restyle, CascadedStyle firstLineStyle) {
static void paintLine(Context c, LineBox line, boolean restyle, CascadedStyle firstLineStyle, LinkedList decorations) {
static void paintLine(Context c, LineBox line, boolean restyle, CascadedStyle firstLineStyle) { // get Xx and y int lx = line.x; int ly = line.y + line.getBaseline(); LinkedList pushedStyles = null; if (firstLineStyle != null) { pushedStyles = new LinkedList(); ...
paintInline(c, box, lx, ly, line, restyle, pushedStyles);
paintInline(c, box, lx, ly, line, restyle, pushedStyles, decorations); } ListIterator li = decorations.listIterator(0); while (li.hasNext()) { TextDecoration decoration = (TextDecoration) li.next(); decoration.paint(c, line); if (decoration.isEnded()) li.remove();
static void paintLine(Context c, LineBox line, boolean restyle, CascadedStyle firstLineStyle) { // get Xx and y int lx = line.x; int ly = line.y + line.getBaseline(); LinkedList pushedStyles = null; if (firstLineStyle != null) { pushedStyles = new LinkedList(); ...
IdentValue decoration = c.getCurrentStyle().getIdent(CSSName.TEXT_DECORATION); if (decoration != IdentValue.NONE) { decorations.addLast(new TextDecoration(decoration, 0, c.getCurrentStyle().getColor(), FontUtil.getLineMetrics(c, null))); }
static void paintLine(Context c, LineBox line, boolean restyle, CascadedStyle firstLineStyle) { // get Xx and y int lx = line.x; int ly = line.y + line.getBaseline(); LinkedList pushedStyles = null; if (firstLineStyle != null) { pushedStyles = new LinkedList(); ...
int stringWidth = (int) Math.ceil(c.getTextRenderer(). getLogicalBounds(c.getGraphics(), c.getGraphics().getFont(), text).getWidth()); IdentValue decoration = c.getCurrentStyle().getIdent(CSSName.TEXT_DECORATION); if (decoration == IdentValue.UNDERLINE) { float down = lm.getUnderlineOffset(); float thick = lm.getUnd...
public static void paintText(Context c, int ix, int iy, InlineTextBox inline, LineMetrics lm) { String text = inline.getSubstring(); Graphics g = c.getGraphics(); //adjust font for current settings Font oldfont = c.getGraphics().getFont(); c.getGraphics().setFont(FontUtil.getFont(...
if (!state.getToAck().isEmpty()) { del.acknowledgeBatch(state.getToAck());
if (!state.getClientAckList().isEmpty()) { del.acknowledgeDeliveries(state.getClientAckList());
public Object handleAcknowledgeAll(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); if (!state.getToAck().isEmpty()) { ...
state.getToAck().clear();
state.getClientAckList().clear();
public Object handleAcknowledgeAll(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); if (!state.getToAck().isEmpty()) { ...
List acks = new ArrayList(); List cancels = new ArrayList(); for(Iterator i = state.getToAck().iterator(); i.hasNext(); )
if (ackMode == Session.AUTO_ACKNOWLEDGE || ackMode == Session.DUPS_OK_ACKNOWLEDGE || (state.isXA() && state.getCurrentTxId() == null))
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
DeliveryInfo ack = (DeliveryInfo)i.next(); if (ackMode == Session.AUTO_ACKNOWLEDGE || ackMode == Session.DUPS_OK_ACKNOWLEDGE)
DeliveryInfo remainingAutoAck = state.getAutoAckInfo(); if (remainingAutoAck != null)
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
acks.add(new DefaultAck(ack.getMessageProxy().getDeliveryId()));
if (trace) { log.trace(this + " handleClosing(). Found remaining auto ack. Will ack it " + remainingAutoAck.getDeliveryId()); } ackDelivery(del, remainingAutoAck); if (trace) { log.trace(this + " acked it"); } state.setAutoAckInfo(null);
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
else
} else if (ackMode == Session.CLIENT_ACKNOWLEDGE) { List cancels = new ArrayList(); for(Iterator i = state.getClientAckList().iterator(); i.hasNext(); )
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
Cancel cancel = new Cancel(ack.getMessageProxy().getDeliveryId(), ack.getMessageProxy().getDeliveryCount());
DeliveryInfo ack = (DeliveryInfo)i.next(); DefaultCancel cancel = new DefaultCancel(ack.getMessageProxy().getDeliveryId(), ack.getMessageProxy().getDeliveryCount());
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
i.remove();
state.getClientAckList().clear();
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
if (!acks.isEmpty()) { del.acknowledgeBatch(acks); } if (!cancels.isEmpty()) { log.info("Calling canceldeliveries: " + cancels.size()); del.cancelDeliveries(cancels); }
public Object handleClosing(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); SessionDelegate del = (SessionDelegate)mi.getTargetObject(); int ackMode = state.getAcknowledgeMode(); // select eligib...
(ackMode != Session.CLIENT_ACKNOWLEDGE && state.getCurrentTxId() == null))
(state.isXA() && state.getCurrentTxId() == null))
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
if (trace) { log.trace("acknowledging NON-transactionally"); }
DeliveryInfo deliveryInfo = state.getAutoAckInfo(); if (deliveryInfo == null) { throw new IllegalStateException("Cannot find delivery to auto ack"); } if (trace) { log.trace(this + " auto acking delivery " + deliveryInfo.getDeliveryId()); }
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
List acks = state.getToAck(); if (acks.size() != 1) { throw new IllegalStateException("Should only be one entry in list. " + "There are " + acks.size()); } DeliveryInfo ack = (DeliveryInfo)acks.get(0);
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
List cancels = new ArrayList(); Cancel c = new Cancel(ack.getMessageProxy().getDeliveryId(), ack.getMessageProxy().getDeliveryCount()); cancels.add(c); sd.cancelDeliveries(cancels);
cancelDelivery(sd, deliveryInfo);
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
sd.acknowledge(ack);
ackDelivery(sd, deliveryInfo);
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
state.getToAck().clear();
state.setAutoAckInfo(null);
public Object handlePostDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); boolean cancel = ((Boolean)mi.getArguments()[0]).booleanValue(); ...
if (ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == Session.AUTO_ACKNOWLEDGE || ackMode == Session.DUPS_OK_ACKNOWLEDGE || state.getCurrentTxId() == null)
Object[] args = mi.getArguments(); DeliveryInfo info = (DeliveryInfo)args[0]; if (ackMode == Session.CLIENT_ACKNOWLEDGE)
public Object handlePreDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == Session...
Object[] args = mi.getArguments(); DeliveryInfo info = (DeliveryInfo)args[0]; state.getToAck().add(info);
public Object handlePreDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == Session...
if (trace) { SessionDelegate del = (SessionDelegate)mi.getTargetObject(); log.trace("ack mode is " + Util.acknowledgmentModeToString(ackMode)+ ", acknowledged on " + del); }
if (trace) { log.trace(this + " delivery id: " + info.getDeliveryId() + " added to client ack list"); } state.getClientAckList().add(info); return null;
public Object handlePreDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == Session...
else if (ackMode == Session.AUTO_ACKNOWLEDGE || ackMode == Session.DUPS_OK_ACKNOWLEDGE || (state.isXA() && state.getCurrentTxId() == null)) { if (trace) { log.trace(this + " delivery id: " + info.getDeliveryId() + " added to client ack member"); } state.setAutoAckInfo(info); return null; }
public Object handlePreDeliver(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ackMode == Session.CLIENT_ACKNOWLEDGE || ackMode == Session...
int ackMode = state.getAcknowledgeMode(); if (ackMode == Session.SESSION_TRANSACTED)
if (state.isTransacted())
public Object handleRecover(Invocation invocation) throws Throwable { if (trace) { log.trace("recover called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ac...
del.redeliver(state.getToAck());
if (state.getAcknowledgeMode() == Session.CLIENT_ACKNOWLEDGE) { del.redeliver(state.getClientAckList()); state.getClientAckList().clear(); } else { DeliveryInfo info = state.getAutoAckInfo(); if (info != null) { List redels = new ArrayList();
public Object handleRecover(Invocation invocation) throws Throwable { if (trace) { log.trace("recover called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ac...
state.getToAck().clear();
redels.add(info); del.redeliver(redels); state.setAutoAckInfo(null); } }
public Object handleRecover(Invocation invocation) throws Throwable { if (trace) { log.trace("recover called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); int ackMode = state.getAcknowledgeMode(); if (ac...
{ if (trace) { log.trace("redeliver called"); }
{
public Object handleRedeliver(Invocation invocation) throws Throwable { if (trace) { log.trace("redeliver called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); // We put the messages back in the front of their appropriate co...
LinkedList toCancel = new LinkedList();
if (trace) { log.trace(this + " handleRedeliver() called: " + toRedeliver); } SessionDelegate del = (SessionDelegate)mi.getTargetObject();
public Object handleRedeliver(Invocation invocation) throws Throwable { if (trace) { log.trace("redeliver called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); // We put the messages back in the front of their appropriate co...
Cancel cancel = new Cancel(info.getMessageProxy().getDeliveryId(), info.getMessageProxy().getDeliveryCount()); toCancel.addFirst(cancel);
cancelDelivery(del, info);
public Object handleRedeliver(Invocation invocation) throws Throwable { if (trace) { log.trace("redeliver called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); // We put the messages back in the front of their appropriate co...
if (!toCancel.isEmpty()) { SessionDelegate del = (SessionDelegate)mi.getTargetObject(); del.cancelDeliveries(toCancel); }
public Object handleRedeliver(Invocation invocation) throws Throwable { if (trace) { log.trace("redeliver called"); } MethodInvocation mi = (MethodInvocation)invocation; SessionState state = getState(invocation); // We put the messages back in the front of their appropriate co...
stripped.addAll(pendingStylePushes);
if (pendingStylePushes.size() != 0) { Element e = ((StylePush) pendingStylePushes.getLast()).getElement(); if (e != null) { stripped.addAll(pendingStylePushes); stripped.addLast(new TextContent(e, "")); } }
private static void stripTextContent(LinkedList stripped) { LinkedList pendingStylePushes = new LinkedList(); LinkedList result = new LinkedList(); for (Iterator i = stripped.iterator(); i.hasNext();) { Object o = i.next(); if (o instanceof TextContent) cont...
WorkflowEdge edge = (WorkflowEdge)k.next(); ResultDescriptor descriptor = (ResultDescriptor)edge.getUserObject();
ResultEdge edge = (ResultEdge)k.next(); ResultDescriptor descriptor = edge.getDescriptor();
public Collection getActivitiesList() { List l = new ArrayList(); l.addAll(initialActions); l.addAll(stepCells); l.addAll(splitCells); l.addAll(joinCells); Iterator i = l.iterator(); Map edges = new HashMap(); while(i.hasNext()) { WorkflowCell cell = (WorkflowCell)i.next(); //we ...
public void loadPage(String url_text, XHTMLPanel panel) throws Exception { Document doc = null;
public void loadPage(String url_text, XHTMLPanel panel) throws MalformedURLException { Document doc = null;
public void loadPage(String url_text, XHTMLPanel panel) throws Exception { Document doc = null; URL ref = null; if (url_text.startsWith("demo:")) { Uu.p("starts with demo"); DemoMarker marker = new DemoMarker(); Uu.p("url text = " + url_text); ...
if (url_text.startsWith("demo:")) { Uu.p("starts with demo"); DemoMarker marker = new DemoMarker(); Uu.p("url text = " + url_text); String short_url = url_text.substring(5); if (!short_url.startsWith("/")) { short_url = "/" + short_url; } Uu.p("short url = " + short_url); ref = marker.getClass().getResource(short_url);...
if (url_text.startsWith("demo:")) { Uu.p("starts with demo"); DemoMarker marker = new DemoMarker(); Uu.p("url text = " + url_text); String short_url = url_text.substring(5); if (!short_url.startsWith("/")) { short_url = "/" + short_url;
public void loadPage(String url_text, XHTMLPanel panel) throws Exception { Document doc = null; URL ref = null; if (url_text.startsWith("demo:")) { Uu.p("starts with demo"); DemoMarker marker = new DemoMarker(); Uu.p("url text = " + url_text); ...
Uu.p("short url = " + short_url); ref = marker.getClass().getResource(short_url); Uu.p("ref = " + ref); panel.setDocument(ref.toExternalForm()); } else if (url_text.startsWith("http")) { panel.setDocument(url_text); } else { ref = new File(url_text).toURL(); panel.setDocument(ref.toExternalForm()); } Uu.p("ref = " + re...
public void loadPage(String url_text, XHTMLPanel panel) throws Exception { Document doc = null; URL ref = null; if (url_text.startsWith("demo:")) { Uu.p("starts with demo"); DemoMarker marker = new DemoMarker(); Uu.p("url text = " + url_text); ...
Message message = consumer.receive(50); if (message==null && shouldStop)
Message message = consumer.receive(5000); if (message == null && shouldStop)
public void run() { try { synchronized (semaphore) { semaphore.wait(); } int counter = 0; while (true) { Message message = consumer.receive(50); if (message==null && shouldStop) ...
session.commit();
public void run() { try { synchronized (semaphore) { semaphore.wait(); } int counter = 0; while (true) { Message message = consumer.receive(50); if (message==null && shouldStop) ...
session.commit();
public void run() { try { synchronized (semaphore) { semaphore.wait(); } int counter = 0; while (!shouldStop) { log.trace("Producer ID=" + id + " send message"); producer.send(session.c...
Connection conn = factory.createConnection();
Connection conn1 = cf.createConnection(); Connection conn2 = cf.createConnection(); Connection conn3 = cf.createConnection(); log.info("Created connections"); checkConnectionsDifferentServers(new Connection[]{conn1, conn2, conn3}); Connection conn = getConnection(new Connection[]{conn1, conn2, conn3}, 1);
public void testMultiThreadFailover() throws Exception { JBossConnectionFactory factory = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory"); Connection conn = factory.createConnection(); conn.start(); ArrayList list = new ArrayList(); for (int i = 0; i < 5; i++) { li...
list.add(new LocalThreadProducer(i, conn.createSession(true, Session.AUTO_ACKNOWLEDGE), queue[1])); list.add(new LocalThreadConsumer(i, conn.createSession(true, Session.AUTO_ACKNOWLEDGE), queue[1]));
list.add(new LocalThreadProducer(i, conn.createSession(false, Session.AUTO_ACKNOWLEDGE), queue[1])); list.add(new LocalThreadConsumer(i, conn.createSession(false, Session.AUTO_ACKNOWLEDGE), queue[1]));
public void testMultiThreadFailover() throws Exception { JBossConnectionFactory factory = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory"); Connection conn = factory.createConnection(); conn.start(); ArrayList list = new ArrayList(); for (int i = 0; i < 5; i++) { li...
shouldStop=true;
log.info("messageCounterConsumer=" + messageCounterConsumer + ", messageCounterProducer=" + messageCounterProducer); shouldStop = true;
public void testMultiThreadFailover() throws Exception { JBossConnectionFactory factory = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory"); Connection conn = factory.createConnection(); conn.start(); ArrayList list = new ArrayList(); for (int i = 0; i < 5; i++) { li...
log.info("produced " + messageCounterProducer + " and read " + messageCounterConsumer);
log.info("messageCounterConsumer=" + messageCounterConsumer + ", messageCounterProducer=" + messageCounterProducer);
public void testMultiThreadFailover() throws Exception { JBossConnectionFactory factory = (JBossConnectionFactory) ic[1].lookup("/ConnectionFactory"); Connection conn = factory.createConnection(); conn.start(); ArrayList list = new ArrayList(); for (int i = 0; i < 5; i++) { li...
if ((newState == WorkflowEntry.KILLED) || (newState == WorkflowEntry.COMPLETED)) { Collection currentSteps = getCurrentSteps(id); if (currentSteps.size() > 0) { completeEntry(id, currentSteps); } }
public void changeEntryState(long id, int newState) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() == newState) { return; } if (canModifyEntryState(id, newState)) { store.setE...
if (isActionAvailable(action, transientVars, ps)) {
if (isActionAvailable(action, transientVars, ps, 0)) {
public void doAction(long id, int actionId, Map inputs) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() != WorkflowEntry.ACTIVATED) { return; } WorkflowDescriptor wf = getConfiguration()....
if (isActionAvailable(action, transientVars, ps)) {
if (isActionAvailable(action, transientVars, ps, s.getId())) {
public void doAction(long id, int actionId, Map inputs) throws WorkflowException { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry.getState() != WorkflowEntry.ACTIVATED) { return; } WorkflowDescriptor wf = getConfiguration()....
if (isActionAvailable(action, transientVars, ps)) {
if (isActionAvailable(action, transientVars, ps, 0)) {
protected int[] getAvailableAutoActions(long id, Map inputs) { try { WorkflowStore store = getPersistence(); WorkflowEntry entry = store.findEntry(id); if (entry == null) { throw new IllegalArgumentException("No such workflow id " + id); } ...
if (isActionAvailable(action, transientVars, ps)) {
if (isActionAvailable(action, transientVars, ps, s.getId())) {
protected List getAvailableAutoActionsForStep(WorkflowDescriptor wf, Step step, Map transientVars, PropertySet ps) throws WorkflowException { List l = new ArrayList(); StepDescriptor s = wf.getStep(step.getStepId()); if (s == null) { log.warn("getAvailableAutoActionsForStep called fo...
if (isActionAvailable(action, transientVars, ps)) {
if (isActionAvailable(action, transientVars, ps, step.getStepId())) {
private Step getCurrentStep(WorkflowDescriptor wfDesc, int actionId, List currentSteps, Map transientVars, PropertySet ps) throws WorkflowException { if (currentSteps.size() == 1) { return (Step) currentSteps.get(0); } for (Iterator iterator = currentSteps.iterator(); iterator.hasNex...
private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps) throws WorkflowException {
private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps, int stepId) throws WorkflowException {
private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps) throws WorkflowException { if (action == null) { return false; } RestrictionDescriptor restriction = action.getRestriction(); String conditionType = null; List conditions = nul...
return passesConditions(conditionType, conditions, Collections.unmodifiableMap(transientVars), ps, 0);
return passesConditions(conditionType, conditions, Collections.unmodifiableMap(transientVars), ps, stepId);
private boolean isActionAvailable(ActionDescriptor action, Map transientVars, PropertySet ps) throws WorkflowException { if (action == null) { return false; } RestrictionDescriptor restriction = action.getRestriction(); String conditionType = null; List conditions = nul...
*/
private void renderPagedView(RenderingContext c, Layer root) { int pageCount = getPageCount(sharedContext); setPreferredSize(new Dimension(sharedContext.getMaxWidth(), (int) (pageCount * c.getPageInfo().getContentHeight() + pageCount * c.getPageInfo().getMargins().top + ...
MessageReference ref = ms.reference(routable);
MessageReference ref; if (!routable.isReference()) { ref = ms.reference((Message)routable); } else { ref = (MessageReference)routable; }
public Set handle(DeliveryObserver observer, Routable routable, Transaction tx) { if (!joined) { return null; } if (log.isTraceEnabled()) { log.trace(this + " handles " + routable); } Set outputs = getOutputs(); if (outputs.isEmpty()) { if (log.isTraceEnabled()) {...
Border border = c.getCurrentStyle().getBorderWidth(c.getCtx());
CalculatedStyle currentStyle = block.getStyle().getCalculatedStyle(); Border border = currentStyle.getBorderWidth(c.getCtx());
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
Border margin = block.getMarginWidth();
Border margin = block.getStyle().getMarginWidth();
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
Color background_color = c.getCurrentStyle().getBackgroundColor();
Color background_color = currentStyle.getBackgroundColor();
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
if (block.attachment == IdentValue.FIXED) {
if (block.getStyle().getBackgroundAttachment() == IdentValue.FIXED) {
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
if (block.repeat == IdentValue.REPEAT_X) {
if (block.getStyle().getBackgroundRepeat() == IdentValue.REPEAT_X) {
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
} if (block.repeat == IdentValue.REPEAT_Y) {
} else if (block.getStyle().getBackgroundRepeat() == IdentValue.REPEAT_Y) {
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
} if (block.repeat == IdentValue.REPEAT) {
} else if (block.getStyle().getBackgroundRepeat() == IdentValue.REPEAT) {
public static void paint(Context c, Box block) { // don't draw if the backgrounds are turned off if (!Configuration.isTrue("xr.renderer.draw.backgrounds", true)) { return; } int width = block.getWidth(); int height = block.getHeight(); if (block.getState() != Box...
int current = this.x;
int calcX = 0;
public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam...
this.x += floatDistance;
calcX = getContentStart() + floatDistance;
public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam...
this.x += midpoint - getContentWidth() / 2;
calcX = midpoint - (getContentWidth() + getContentStart()) / 2;
public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam...
this.x += getParent().getContentWidth() - floatDistance - getContentWidth();
calcX = getParent().getContentWidth() - floatDistance - getContentWidth();
public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam...
if (current != this.x) {
if (calcX != this.x) { this.x = calcX;
public void align() { if (getFloatDistances() == null) { // Shouldn't happen (but currently can with nested tables) XRLog.layout(Level.WARNING, "Float distances not available. Cannot align."); return; } IdentValue align = getParent().getStyle().getCalculatedStyle().getIdent(CSSNam...
} if (isContainsPageCounter()) { lookForPageCounters(c); int totalLineWidth = InlineBoxing.positionHorizontally(c, this, 0); this.contentWidth = totalLineWidth; calcChildLocations(); align();
public void paintInline(RenderingContext c) { if (! getParent().getStyle().isVisible()) { return; } if (textDecoration != null) { c.getOutputDevice().drawTextDecoration(c, this); } if (c.debugDrawLineBoxes()) { c.getOutputDevice().d...
Element getDefaultSecurityConfig() throws Exception;
String getDefaultSecurityConfig() throws Exception;
Element getDefaultSecurityConfig() throws Exception;
void setDefaultSecurityConfig(Element config) throws Exception;
void setDefaultSecurityConfig(String config) throws Exception;
void setDefaultSecurityConfig(Element config) throws Exception;
void setSecurityConfig(String destName, Element config) throws Exception;
void setSecurityConfig(String destName, String config) throws Exception;
void setSecurityConfig(String destName, Element config) throws Exception;
return ((ConnectionState)state).getClient();
return ((ConnectionState)state).getRemotingConnection().getInvokingClient();
protected Client getClient() { return ((ConnectionState)state).getClient(); }