rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if ((m.isSelected() && checkIcon == null) || m.getModel().isArmed()
ButtonModel mod = m.getModel(); if ((m.isSelected() && checkIcon == null) || (mod != null && mod.isArmed())
protected void paintMenuItem(Graphics g, JComponent c, Icon checkIcon, Icon arrowIcon, Color background, Color foreground, int defaultTextIconGap) { JMenuItem m = (JMenuItem) c; Rectangle tr = new Rectangle(); // text rectangle Rectangle ir = new R...
|| menuItem.getModel().isArmed()
|| (mod != null && mod.isArmed())
protected void paintText(Graphics g, JMenuItem menuItem, Rectangle textRect, String text) { Font f = menuItem.getFont(); g.setFont(f); FontMetrics fm = g.getFontMetrics(f); if (text != null && !text.equals("")) { if (menuItem.isEnabled()) { // Men...
return new CustomEdgeView(cell);
CustomEdgeView view = (CustomEdgeView)edgeMap.get(cell); if(view == null) { view = new CustomEdgeView(cell); edgeMap.put(cell ,view); } return view;
public CellView createView(GraphModel model, Object cell) { if(model.isPort(cell)) { return new CustomPortView(cell); } else if(model.isEdge(cell)) { return new CustomEdgeView(cell); } else if(cell instanceof StepCell) return new StepView(cell); else if(cell instanceof SplitCel...
return new VertexView(cell);
return super.createView(model, cell);
public CellView createView(GraphModel model, Object cell) { if(model.isPort(cell)) { return new CustomPortView(cell); } else if(model.isEdge(cell)) { return new CustomEdgeView(cell); } else if(cell instanceof StepCell) return new StepView(cell); else if(cell instanceof SplitCel...
ref.incrementChannelCount();
public void afterCommit(boolean onePhase) { //We add the reference to the state if (trace) { log.trace(this + ": adding " + ref + " to non-recoverable state"); } ref.incrementChannelCount(); boolean first = false; try { ...
ref.releaseMemoryReference();
public void afterRollback(boolean onePhase) { //NOOP }
del.getReference().decrementChannelCount();
del.getReference().releaseMemoryReference();
public void afterCommit(boolean onePhase) { if (trace) { log.trace(this + " removing " + del + " after commit"); } del.getReference().decrementChannelCount(); try { acknowledgeInMemory(del); } catch (Throwable t) { ...
{ acknowledgeInMemory(del);
{ synchronized (deliveryLock) { acknowledgeInMemory(del); }
public void afterCommit(boolean onePhase) { if (trace) { log.trace(this + " removing " + del + " after commit"); } del.getReference().decrementChannelCount(); try { acknowledgeInMemory(del); } catch (Throwable t) { ...
if (downCacheSize < 0)
if (downCacheSize <= 0)
public ChannelState(Channel channel, PersistenceManager pm, boolean acceptReliableMessages, boolean recoverable, int fullSize, int pageSize, int downCacheSize) { if (pm == null) { throw new IllegalArgumentException("ChannelState requires a " + ...
throw new IllegalArgumentException("downCacheSize cannot be less than zero");
throw new IllegalArgumentException("downCacheSize must be greater than zero");
public ChannelState(Channel channel, PersistenceManager pm, boolean acceptReliableMessages, boolean recoverable, int fullSize, int pageSize, int downCacheSize) { if (pm == null) { throw new IllegalArgumentException("ChannelState requires a " + ...
synchronized (deliveryLock) { boolean removed = deliveries.remove(d); if (trace) { log.trace(this + " removed " + d + " from memory:" + removed); } }
if (trace) { log.trace(this + " removed " + d + " from memory:" + removed); }
protected void acknowledgeInMemory(Delivery d) throws Throwable { if (d == null) { throw new IllegalArgumentException("Can't acknowledge a null delivery"); } synchronized (deliveryLock) { boolean removed = deliveries.remove(d); if (trace) ...
} if (recoverable && ref.isReliable())
} if (ref.isReliable() && recoverable)
public void addReference(MessageReference ref, Transaction tx) throws Throwable { if (trace) { log.trace(this + " adding " + ref + "transactionally in transaction: " + tx); } if (ref.isReliable() && !acceptReliableMessages) { // this transaction has no chance to succeed, since a reliable mes...
boolean first = messageRefs.addLast(ref, ref.getPriority());
if (trace) { log.trace(this + " added " + ref + " non-transactionally in memory"); }
protected boolean addReferenceInMemory(MessageReference ref) throws Throwable { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } boolea...
if (trace) { log.trace(this + " added " + ref + " non-transactionally in memory"); }
if (messageRefs.size() == fullSize) {
protected boolean addReferenceInMemory(MessageReference ref) throws Throwable { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } boolea...
if (messageRefs.size() == fullSize) { if (trace) { log.trace(this + " going into paging mode"); } paging = true; }
if (trace) { log.trace(this + " going into paging mode"); }
protected boolean addReferenceInMemory(MessageReference ref) throws Throwable { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } boolea...
return first;
paging = true; } } return first;
protected boolean addReferenceInMemory(MessageReference ref) throws Throwable { if (ref.isReliable() && !acceptReliableMessages) { throw new IllegalStateException("Reliable reference " + ref + " cannot be added to non-recoverable state"); } boolea...
ref.decrementChannelCount();
addToDownCache(ref);
public void cancelDelivery(Delivery del) throws Throwable { if (trace) { log.trace(this + " cancelling " + del + " in memory"); } synchronized (deliveryLock) { boolean removed = deliveries.remove(del); if (!removed) { //This is ok ...
if (!ref.isReliable()) { if (downCacheSize > 0) { addToDownCache(ref); } else { pm.addReference(channel.getChannelID(), ref, null); } }
refsInStorage++;
public void cancelDelivery(Delivery del) throws Throwable { if (trace) { log.trace(this + " cancelling " + del + " in memory"); } synchronized (deliveryLock) { boolean removed = deliveries.remove(del); if (!removed) { //This is ok ...
if (messageRefs.size() == fullSize - numberLoadable)
if (messageRefs.size() <= fullSize - numberLoadable)
protected void checkLoad() throws Throwable { if (refsInStorage > 0) { int numberLoadable = Math.min(refsInStorage, pageSize); if (messageRefs.size() == fullSize - numberLoadable) { load(numberLoadable, false); ...
load(numberLoadable, false);
load(numberLoadable);
protected void checkLoad() throws Throwable { if (refsInStorage > 0) { int numberLoadable = Math.min(refsInStorage, pageSize); if (messageRefs.size() == fullSize - numberLoadable) { load(numberLoadable, false); ...
else { paging = false; }
protected void checkLoad() throws Throwable { if (refsInStorage > 0) { int numberLoadable = Math.min(refsInStorage, pageSize); if (messageRefs.size() == fullSize - numberLoadable) { load(numberLoadable, false); ...
if (trace) { log.trace(this + " flushes downcache"); } pm.addReferences(channel.getChannelID(), downCache);
if (trace) { log.trace(this + " flushing " + downCache.size() + " refs from downcache"); }
protected void flushDownCache() throws Exception { if (trace) { log.trace(this + " flushes downcache"); } pm.addReferences(channel.getChannelID(), downCache); downCache.clear(); if (trace) { log.trace(this + " cleared downcache"); } }
{ refsInStorage = pm.getNumberOfReferences(channel.getChannelID());
{ refsInStorage = pm.getNumberOfUnloadedReferences(channel.getChannelID());
public void load() throws Exception { synchronized (refLock) { refsInStorage = pm.getNumberOfReferences(channel.getChannelID()); if (refsInStorage > 0) { load(refsInStorage, true); } } }
load(refsInStorage, true);
load(Math.min(refsInStorage, fullSize));
public void load() throws Exception { synchronized (refLock) { refsInStorage = pm.getNumberOfReferences(channel.getChannelID()); if (refsInStorage > 0) { load(refsInStorage, true); } } }
return (MessageReference)messageRefs.peekFirst();
MessageReference ref = (MessageReference)messageRefs.peekFirst(); return ref;
public MessageReference peekFirst() throws Throwable { synchronized (refLock) { return (MessageReference)messageRefs.peekFirst(); } }
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) {
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font, CascadedStyle firstLineStyle) {
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { //u.p("box = " + box); //u.p("prev align = " + prev_align); Element elem = null; if (box.getNode() instanceof Element) { elem = (Element) box.getNode(); } else { elem = (E...
if (TextDecoration.isDecoratable(c, box.getNode())) { TextDecoration.setupTextDecoration(c, box.getNode(), box);
if (TextDecoration.isDecoratable(box)) { TextDecoration.setupTextDecoration(style, box);
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { //u.p("box = " + box); //u.p("prev align = " + prev_align); Element elem = null; if (box.getNode() instanceof Element) { elem = (Element) box.getNode(); } else { elem = (E...
CascadedStyle pseudo = c.css.getPseudoElementStyle(LineBreaker.getNearestBlockElement(box.getNode(), c), "first-line"); if (pseudo != null) {
if (firstLineStyle != null) {
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { //u.p("box = " + box); //u.p("prev align = " + prev_align); Element elem = null; if (box.getNode() instanceof Element) { elem = (Element) box.getNode(); } else { elem = (E...
CalculatedStyle merged = c.css.getDerivedStyle(normal, pseudo);
CalculatedStyle merged = c.css.getDerivedStyle(normal, firstLineStyle);
public static void prepBox(Context c, InlineBox box, InlineBox prev_align, Font font) { //u.p("box = " + box); //u.p("prev align = " + prev_align); Element elem = null; if (box.getNode() instanceof Element) { elem = (Element) box.getNode(); } else { elem = (E...
public Class getCategory()
public final Class getCategory()
public Class getCategory() { return PrinterStateReason.class; }
public String getName()
public final String getName()
public String getName() { return "printer-state-reason"; }
0,
protected Message createMessage(byte i, boolean reliable) throws Exception { HashMap coreHeaders = generateFilledMap(true); HashMap jmsProperties = generateFilledMap(false); JBossBytesMessage m = new JBossBytesMessage(i, reliable, System.current...
org.xhtmlrenderer.css.newmatch.CascadedStyle matched = _matcher.getCascadedStyle(elem);
org.xhtmlrenderer.css.newmatch.CascadedStyle matched = _matcher.matchElement(elem);
public void restyleTree( org.w3c.dom.Element elem ) { CalculatedStyle parent = null; // if this is the root, we will have no parent XRElement; otherwise // we will check to see if our parent was loaded. Since we expect to load // from root to leaves, we should always find...
Message m = null; while (System.currentTimeMillis() - start < 1000)
m = null; while (System.currentTimeMillis() - start < RECEIVE_TIMEOUT)
protected Message getMessage() throws Exception { if (isListener) { long start = System.currentTimeMillis(); Message m = null; while (System.currentTimeMillis() - start < 1000) { if (theMessage != null) { m = theMessage; th...
return m;
protected Message getMessage() throws Exception { if (isListener) { long start = System.currentTimeMillis(); Message m = null; while (System.currentTimeMillis() - start < 1000) { if (theMessage != null) { m = theMessage; th...
{ return cons.receive(1000);
{ m = cons.receive(RECEIVE_TIMEOUT);
protected Message getMessage() throws Exception { if (isListener) { long start = System.currentTimeMillis(); Message m = null; while (System.currentTimeMillis() - start < 1000) { if (theMessage != null) { m = theMessage; th...
return m;
protected Message getMessage() throws Exception { if (isListener) { long start = System.currentTimeMillis(); Message m = null; while (System.currentTimeMillis() - start < 1000) { if (theMessage != null) { m = theMessage; th...
log.info("Received:" + numMessages);
public void run() { //Small pause so as not to miss any messages in a topic try { Thread.sleep(1000); } catch (InterruptedException e) { } try { while (count < numMessages) { Message m = getMessa...
Dimension dim = root.getLayer().getPaintingDimension(c); root.getLayer().trimEmptyPages(c, dim.height);
public void layout() { LayoutContext c = newLayoutContext(); BlockBox root = Boxing.constructBox(c, new DomToplevelNode(_doc)); Boxing.layout(c, root, new DomToplevelNode(_doc)); _root = root; }
sm.setSecurityConfig(isQueue(), destination.getName(), destination.getSecurityConfig());
public synchronized void startService() throws Exception { super.startService(); try { postOffice = serverPeer.getTopicPostOfficeInstance(); destination.setPostOffice(postOffice); // We deploy any queues corresponding to pre-existing durable subscrip...
Rectangle clip = g.getClipBounds();
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); Rectangle clip = g.getClipBounds(); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } paint(g, c); }
g.setColor(oldColor);
public void update(Graphics g, JComponent c) { if (c.isOpaque()) { g.setColor(c.getBackground()); Rectangle clip = g.getClipBounds(); g.fillRect(0, 0, c.getWidth(), c.getHeight()); } paint(g, c); }
WorkflowDescriptor() {
public WorkflowDescriptor() {
WorkflowDescriptor() { }
case FieldExpression.DUE_DATE: return "dueDate";
private String getFieldName(int field) { switch (field) { case FieldExpression.ACTION: // actionId return "actionId"; case FieldExpression.CALLER: return "caller"; case FieldExpression.FINISH_DATE: return "finishDate"; case FieldExpression.OWNER: ...
if (request.requestType == TransactionRequest.ONE_PHASE_COMMIT_REQUEST)
if (request.getRequestType() == TransactionRequest.ONE_PHASE_COMMIT_REQUEST)
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
processTx(request.txInfo, tx);
processCommit(request.getState(), tx);
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
else if (request.requestType == TransactionRequest.TWO_PHASE_COMMIT_PREPARE_REQUEST)
else if (request.getRequestType() == TransactionRequest.ONE_PHASE_ROLLBACK_REQUEST) { if (log.isTraceEnabled()) { log.trace("One phase rollback request received"); } processRollback(request.getState()); } else if (request.getRequestType() == TransactionRequest.TWO_PHASE_PREPARE_REQUEST)
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
tx = txRep.createTransaction(request.xid); processTx(request.txInfo, tx);
tx = txRep.createTransaction(request.getXid()); processCommit(request.getState(), tx);
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
else if (request.requestType == TransactionRequest.TWO_PHASE_COMMIT_COMMIT_REQUEST)
else if (request.getRequestType() == TransactionRequest.TWO_PHASE_COMMIT_REQUEST)
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
tx = txRep.getPreparedTx(request.xid);
tx = txRep.getPreparedTx(request.getXid());
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
else if (request.requestType == TransactionRequest.TWO_PHASE_COMMIT_ROLLBACK_REQUEST)
else if (request.getRequestType() == TransactionRequest.TWO_PHASE_ROLLBACK_REQUEST)
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
tx = txRep.getPreparedTx(request.xid);
tx = txRep.getPreparedTx(request.getXid()); processRollback(request.getState());
public void sendTransaction(TransactionRequest request) throws JMSException { try { closeLock.readLock().acquire(); } catch (InterruptedException e) { //Ignore } try { if (closed) { throw new IllegalStateException("Connection is clo...
int lineHeight;
int lineHeight = new_inline.height;
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
lineHeight = (int) Math.round(new_inline.getStyle().getCalculatedStyle().getLineHeight(c));
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
lineHeight = new_inline.height;
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
if (ascent + raised > curr_line.ascent) { curr_line.ascent = ascent + raised;
if (top + raised > curr_line.inlineTop) { curr_line.inlineTop = top + raised;
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
if (descent - raised > curr_line.descent) { curr_line.descent = descent - raised;
if (bottom - raised > curr_line.inlineBottom) { curr_line.inlineBottom = bottom - raised;
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
if (curr_line.height < curr_line.ascent + curr_line.descent) { curr_line.height = curr_line.ascent + curr_line.descent;
if (curr_line.height < curr_line.inlineTop + curr_line.inlineBottom) { curr_line.height = curr_line.inlineTop + curr_line.inlineBottom;
static void adjustLineHeight(LayoutContext c, LineBox curr_line, InlineBox new_inline) { int lineHeight; int ascent; int descent; if (new_inline instanceof InlineTextBox && !((InlineTextBox) new_inline).getSubstring().equals("")) { // should be the metrics of the font, actuall...
inline.height = (int) inline.getStyle().getCalculatedStyle().getLineHeight(c);
private static InlineBox calculateInline(LayoutContext c, Content content, int taken, int max_width, InlineBox prev_align, boolean isFirstLetter, CascadedStyle firstLetterStyle, LineBox curr_line, int start, InlineBlockBox pendi...
inline.height = (int) FontUtil.getLineMetrics(inline.getStyle().getFont(c), inline, c.getTextRenderer(), c.getGraphics()).getHeight();
private static void prepareBox(InlineBox prev_align, InlineTextBox inline, LayoutContext c) { if (prev_align != null && !prev_align.break_after && !inline.break_before ) { inline.x = prev_align.x + prev_align.getWidth(); } else { inline.x = 0;...
g.fillRect(0, 0, getWidth(), getHeight());
g.fillRect(clip.x, clip.y, clip.width, clip.height); g.setColor(oldColor); }
public void paint(Graphics g) { g.setColor(getBackground()); g.fillRect(0, 0, getWidth(), getHeight()); super.paint(g); }
void start(String containerConfig) throws Exception;
void start(String containerConfig, boolean clearDatabase) throws Exception;
void start(String containerConfig) throws Exception;
panel.setViewportComponent(scroll); panel.setJScrollPane(scroll);
public AboutBox(String text, String url) { super(); u.p("starting the about box"); setTitle(text); HTMLPanel panel = new HTMLPanel(); int w = 400; int h = 500; panel.setPreferredSize(new Dimension(w,h)); scroll = new JScrollPane(panel); scroll.s...
AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/about/index.xhtml");
AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/index.xhtml");
public static void main(String[] args) { JFrame frame = new JFrame("About Box Test"); frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE); JButton launch = new JButton("Show About Box"); frame.getContentPane().add(launch); frame.pack(); frame.setVisible(true); ...
AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/about/index.xhtml");
AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/index.xhtml");
public void actionPerformed(ActionEvent evt) { AboutBox ab = new AboutBox("About Flying Saucer","demo:demos/about/index.xhtml"); ab.setVisible(true); }
setPositionsInRange(gapEnd, 0, gapStart);
protected void replace(int position, int rmSize, Object addItems, int addSize) { if (gapStart != position) shiftGap(position); // Remove content if (rmSize > 0) shiftGapEndUp(gapEnd + rmSize); // If gap is too small, enlarge the gap. if ((gapEnd - gapStart) <= add...
assertEquals(new Integer(100), ServerManagement.getAttribute(destObjectName, "FullSize")); assertEquals(new Integer(20), ServerManagement.getAttribute(destObjectName, "PageSize")); assertEquals(new Integer(10), ServerManagement.getAttribute(destObjectName, "DownCacheSize"));
assertEquals(new Integer(50000), ServerManagement.getAttribute(destObjectName, "FullSize")); assertEquals(new Integer(1000), ServerManagement.getAttribute(destObjectName, "PageSize")); assertEquals(new Integer(1000), ServerManagement.getAttribute(destObjectName, "DownCacheSize"));
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
assertEquals(100, cd.getFullSize()); assertEquals(20, cd.getPageSize()); assertEquals(10, cd.getDownCacheSize());
assertEquals(50000, cd.getFullSize()); assertEquals(1000, cd.getPageSize()); assertEquals(1000, cd.getDownCacheSize());
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
assertEquals(new Integer(100), ServerManagement.getAttribute(destObjectName, "FullSize"));
assertEquals(new Integer(50000), ServerManagement.getAttribute(destObjectName, "FullSize"));
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
assertEquals(new Integer(20), ServerManagement.getAttribute(destObjectName, "PageSize"));
assertEquals(new Integer(1000), ServerManagement.getAttribute(destObjectName, "PageSize"));
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
assertEquals(new Integer(10), ServerManagement.getAttribute(destObjectName, "DownCacheSize"));
assertEquals(new Integer(1000), ServerManagement.getAttribute(destObjectName, "DownCacheSize"));
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
ServerManagement.setAttribute(destObjectName, "FullSize", "1111"); assertEquals(new Integer(1111), ServerManagement.getAttribute(destObjectName, "FullSize")); ServerManagement.setAttribute(destObjectName, "PageSize", "222"); assertEquals(new Integer(222), ServerManagement.getAttribute(destObjectName, "PageSize")); Serv...
ServerManagement.setAttribute(destObjectName, "FullSize", "51111"); assertEquals(new Integer(51111), ServerManagement.getAttribute(destObjectName, "FullSize")); ServerManagement.setAttribute(destObjectName, "PageSize", "1001"); assertEquals(new Integer(1001), ServerManagement.getAttribute(destObjectName, "PageSize")); ...
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
assertEquals(1111, cd.getFullSize()); assertEquals(222, cd.getPageSize()); assertEquals(33, cd.getDownCacheSize());
assertEquals(51111, cd.getFullSize()); assertEquals(1001, cd.getPageSize()); assertEquals(999, cd.getDownCacheSize());
public void testPageableChannelAttributes() throws Exception { String config = "<mbean code=\"org.jboss.jms.server.destination.@TOREPLACE@\" " + " name=\"somedomain:service=@TOREPLACE@,name=PageableAttributes\"" + " xmbean-dd=\"xmdesc/@TOREPLACE@-xmbean.xml\">" + " ...
Client client = new Client(new InvokerLocator(connState.getServerURI())); client.addListener(messageHandler, connState.getCallbackServer().getLocator());
Client client = connState.getRemotingConnection().registerCallbackHandler(messageHandler);
public Object handleCreateConsumerDelegate(Invocation invocation) throws Throwable { MethodInvocation mi = (MethodInvocation)invocation; boolean isCC = ((Boolean)mi.getArguments()[4]).booleanValue(); //Create the message handler SessionState sessState = (SessionState)((DelegateSup...
if (!isDisplayable ())
if (isDisplayable ())
public void setUndecorated (boolean undecorated) { if (!isDisplayable ()) throw new IllegalComponentStateException (); this.undecorated = undecorated; }
if (log.isTraceEnabled()) { log.trace(this + " starting"); }
log.debug(this + " starting");
public synchronized void start() throws Exception { if (started) { return; } if (log.isTraceEnabled()) { log.trace(this + " starting"); } mbeanServer = findMBeanServer(); transactionManager = findTransactionManager(); clientManager = new ClientManager(this); destinat...
g.translate(0, -page.getPaintingTop());
int top = -page.getPaintingTop() + page.getStyle().getMarginBorderPadding(c, CalculatedStyle.TOP); int left = page.getStyle().getMarginBorderPadding(c, CalculatedStyle.LEFT); g.translate(left, top);
public void paintPage(Graphics2D g, int pageNo) { Layer root = getRootLayer(); if (root == null) { throw new RuntimeException("Document needs layout"); } if (pageNo < 0 || pageNo >= root.getPages().size()) { throw new IllegalArgumentException("Page " + pageN...
g.translate(0, page.getPaintingTop());
g.translate(-left, -top);
public void paintPage(Graphics2D g, int pageNo) { Layer root = getRootLayer(); if (root == null) { throw new RuntimeException("Document needs layout"); } if (pageNo < 0 || pageNo >= root.getPages().size()) { throw new IllegalArgumentException("Page " + pageN...
page.paintAlternateFlows(c, root, 0);
page.paintAlternateFlows(c, root, Layer.PAGED_MODE_PRINT, 0);
public void paintPage(Graphics2D g, int pageNo) { Layer root = getRootLayer(); if (root == null) { throw new RuntimeException("Document needs layout"); } if (pageNo < 0 || pageNo >= root.getPages().size()) { throw new IllegalArgumentException("Page " + pageN...
root.assignPagePaintingPositions(c, PAGE_PAINTING_CLEARANCE);
root.assignPagePaintingPositions( c, Layer.PAGED_MODE_SCREEN, PAGE_PAINTING_CLEARANCE);
private void paintPagedView(RenderingContext c, Layer root) { if (root.getLastPage() == null) { return; } root.assignPagePaintingPositions(c, PAGE_PAINTING_CLEARANCE); setPreferredSize(new Dimension( root.getMaxPageWidth(c, PAGE_PAINTING_CLEARANCE), ...
page.paintAlternateFlows(c, root, PAGE_PAINTING_CLEARANCE);
page.paintAlternateFlows(c, root, Layer.PAGED_MODE_SCREEN, PAGE_PAINTING_CLEARANCE);
private void paintPagedView(RenderingContext c, Layer root) { if (root.getLastPage() == null) { return; } root.assignPagePaintingPositions(c, PAGE_PAINTING_CLEARANCE); setPreferredSize(new Dimension( root.getMaxPageWidth(c, PAGE_PAINTING_CLEARANCE), ...
Rectangle contentBounds = replaced.getContentAreaEdge( replaced.getAbsX(), replaced.getAbsY(), c); Point loc = replaced.getReplacedElement().getLocation(); if (contentBounds.x != loc.x || contentBounds.y != loc.y) { replaced.getReplacedElement().setLocation(contentBounds.x, contentBounds.y); }
private void paintReplacedElement(RenderingContext c, BlockBox replaced) { if (! c.isInteractive()) { c.getOutputDevice().paintReplacedElement(c, replaced); } }
if (oneWay && response == EMPTY) return;
private void p_invoke() throws SystemException, ForwardRequest { RawReply response = submit(); if (m_rph == null) m_rph = response.header.create_reply_header(); BufferredCdrInput input = response.getStream(); input.setOrb(orb); m_rph.read(input); // The stream must be aligned sinve v1.2, bu...
catch (BindException ex)
catch (IOException ex)
public synchronized RawReply submit() throws ForwardRequest { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useV...
if (!socket.isClosed())
if (!socket.isClosed() && !oneWay)
public synchronized RawReply submit() throws ForwardRequest { gnu.CORBA.GIOP.MessageHeader header = new gnu.CORBA.GIOP.MessageHeader(); header.setBigEndian(Big_endian); // The byte order will be Big Endian by default. header.message_type = gnu.CORBA.GIOP.MessageHeader.REQUEST; header.version = useV...
MARSHAL t = new MARSHAL();
MARSHAL t = new MARSHAL(ex.getMessage());
public void write(java.io.OutputStream out) { try { AbstractDataOutput dout; if (isBigEndian()) dout = new BigEndianOutputStream(out); else dout = new LittleEndianOutputStream(out); // Write magic sequence. dout.write(MAGIC); // Write version number...
throws MARSHAL
throws MARSHAL, EOFException
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[MAGIC.length]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; ...
istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC))
int r = istream.read(xMagic); int minor; if (! Arrays.equals(xMagic, MAGIC))
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[MAGIC.length]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; ...
MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop;
StringBuffer b = new StringBuffer(); if (r == - 1) { b.append("Immediate EOF"); minor = Minor.EOF; } else { minor = Minor.Giop; b.append(r + " bytes: "); for (int i = 0; i < xMagic.length; i++) { b.append(Integer.toHexString(xMagic[i] & 0xFF)); b.append(' '); } } MARSHAL m = new MARSHAL("Not a GIOP message: " + b); m.m...
public void read(java.io.InputStream istream) throws MARSHAL { try { byte[] xMagic = new byte[MAGIC.length]; istream.read(xMagic); if (!Arrays.equals(xMagic, MAGIC)) { MARSHAL m = new MARSHAL("Not a GIOP message"); m.minor = Minor.Giop; ...
u.p("warning not equals"); File dfile = new File("correct.diff"); File tfile = new File("test.diff"); u.p("writing to " + dfile + " and " + tfile); u.string_to_file(tin,tfile); u.string_to_file(din,dfile);
public boolean compareTestFile( String test, String diff, int width, int height ) throws Exception { String tin = xhtmlToDiff( test, width, height ); String din = u.file_to_string( diff ); //u.p("tin = "); //u.p(tin); //u.p("din = "); //u.p(din); if ( tin.equa...
if (log.isTraceEnabled()) { log.trace("Calling afterSend"); }
public Object invoke(Invocation invocation) throws Throwable { if (!(invocation instanceof MethodInvocation)) { return invocation.invokeNext(); } MethodInvocation mi = (MethodInvocation)invocation; String methodName = mi.getMethod().getName(); Object[] args = mi.ge...
if (node.getNodeType() != node.ELEMENT_NODE) {
if (node.getNodeType() != Node.ELEMENT_NODE) {
public static Image getImage(Context c, Node node) { if (node.getNodeType() != node.ELEMENT_NODE) { return null; } String src = ((Element) node).getAttribute("src"); Image img = null; try { img = ImageUtil.loadImage(c, src); } catch (Exception ex) { ...
connectionID = in.readInt();
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { super.readExternal(in); destination = readDestination(in); replyToDestination = readDestination(in); jmsType = readString(in); Map m = readMap(in, true); if (!(m instanceof HashMap)) ...
} out.writeInt(connectionID);
}
public void writeExternal(ObjectOutput out) throws IOException { super.writeExternal(out); writeDestination(out, destination); writeDestination(out, replyToDestination); writeString(out, jmsType); writeMap(out, properties, true); if (correlationID == null && co...
topic = (Topic)initialContext.lookup("/topic/Topic"); drainDestination(cf, queue);
topic = (Topic)initialContext.lookup("/topic/Topic");
public void setUp() throws Exception { super.setUp(); ServerManagement.start("all"); initialContext = new InitialContext(ServerManagement.getJNDIEnvironment()); cf = (JBossConnectionFactory)initialContext.lookup("/ConnectionFactory"); ServerManagement.undeployQueue("Queue"); Ser...
BigInteger q_minus_1 = q.subtract(BigInteger.ONE);
BigInteger q_minus_1 = null; if (q != null) q_minus_1 = q.subtract(BigInteger.ONE);
public KeyPair generate() { if (p == null) { BigInteger[] params = new RFC2631(m, l, rnd).generateParameters(); seed = params[RFC2631.DH_PARAMS_SEED]; counter = params[RFC2631.DH_PARAMS_COUNTER]; q = params[RFC2631.DH_PARAMS_Q]; p = params[RFC2631.DH_PARAMS_P]; j = p...
&& x.compareTo(q_minus_1) < 0)
&& (q_minus_1 == null || x.compareTo(q_minus_1) < 0))
public KeyPair generate() { if (p == null) { BigInteger[] params = new RFC2631(m, l, rnd).generateParameters(); seed = params[RFC2631.DH_PARAMS_SEED]; counter = params[RFC2631.DH_PARAMS_COUNTER]; q = params[RFC2631.DH_PARAMS_Q]; p = params[RFC2631.DH_PARAMS_P]; j = p...
l = jceSpec.getP().bitLength();
p = jceSpec.getP(); g = jceSpec.getG(); l = p.bitLength();
public void setup(Map attributes) { // do we have a SecureRandom, or should we use our own? rnd = (SecureRandom) attributes.get(SOURCE_OF_RANDOMNESS); // are we given a set of Diffie-Hellman generation parameters or we shall // use our own? Object params = attributes.get(DH_PARAMETERS); // find out...
if (m == 0) m = l;
public void setup(Map attributes) { // do we have a SecureRandom, or should we use our own? rnd = (SecureRandom) attributes.get(SOURCE_OF_RANDOMNESS); // are we given a set of Diffie-Hellman generation parameters or we shall // use our own? Object params = attributes.get(DH_PARAMETERS); // find out...
if (log.isTraceEnabled()) { log.trace("activating consumer endpoint"); } consumerDelegate.activate();
if (trace) { log.trace("activating consumer endpoint"); } MessageDelegate m = (MessageDelegate)consumerDelegate.getMessageNow(true); if (m != null) { handleMessage(m); }
public void run() { try { if (log.isTraceEnabled()) { log.trace("activating consumer endpoint"); } consumerDelegate.activate(); } catch(Throwable t) { log.error("Consumer endpoint activation failed", t); if (t.getCause() != n...