rem
stringlengths
0
477k
add
stringlengths
0
313k
context
stringlengths
6
599k
if (log.isTraceEnabled()) { log.trace("There are " + count + " deliveries"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, channelID) + " selected " + count + " row(s)"); }
public List deliveries(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("listing deliveries for channel: " + channelID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ...
if (log.isTraceEnabled()) { log.trace(sql); }
public List messages(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("Getting message references for channel " + channelID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper()...
if (log.isTraceEnabled()) { log.trace("got " + result.size() + " message refs"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, channelID) + " selected " + result.size() + " row(s)"); }
public List messages(Serializable channelID) throws Exception { if (log.isTraceEnabled()) { log.trace("Getting message references for channel " + channelID); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper()...
if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID);}
if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID + (tx == null ? " non-transactionally" : " on transaction: " + tx));}
public boolean remove(Serializable channelID, Delivery d, Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID);} Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new Tr...
ps.setString(2, (String)d.getReference().getStoreID());
ps.setString(2, (String)channelID);
public boolean remove(Serializable channelID, Delivery d, Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID);} Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new Tr...
updated = ps.executeUpdate();
updated = ps.executeUpdate(); if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, String.valueOf(tx.getID()), channelID, d.getReference().getMessageID()) + " updated " + updated + " row(s)"); }
public boolean remove(Serializable channelID, Delivery d, Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID);} Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new Tr...
if (log.isTraceEnabled()) { log.trace(sql); log.trace("Removed/updated " + updated + " rows"); }
public boolean remove(Serializable channelID, Delivery d, Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Removing delivery " + d + " from channel: " + channelID);} Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new Tr...
ps = conn.prepareStatement("DELETE FROM TRANSACTION WHERE TRANSACTIONID = ?");
String sql = "DELETE FROM TRANSACTION WHERE TRANSACTIONID = ?"; ps = conn.prepareStatement(sql);
protected void removeTXRecord(Connection conn, Transaction tx) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement("DELETE FROM TRANSACTION WHERE TRANSACTIONID = ?"); ps.setString(1, String.valueOf(tx.getID())); ps.executeUpdate(); } ...
ps.executeUpdate();
int rows = ps.executeUpdate(); if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, String.valueOf(tx.getID())) + " removed " + rows + " row(s)"); }
protected void removeTXRecord(Connection conn, Transaction tx) throws SQLException { PreparedStatement ps = null; try { ps = conn.prepareStatement("DELETE FROM TRANSACTION WHERE TRANSACTIONID = ?"); ps.setString(1, String.valueOf(tx.getID())); ps.executeUpdate(); } ...
if (log.isTraceEnabled()) { log.trace(sql); }
int count = 0;
public Message retrieve(Serializable messageID) throws Exception { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try { Message m = null; conn = ds.getConnection(); String s...
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, messageID) + " selected " + count + " row(s)"); }
public Message retrieve(Serializable messageID) throws Exception { Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); try { Message m = null; conn = ds.getConnection(); String s...
if (log.isTraceEnabled()) { log.trace("Removed " + rows + " rows from MESSAGE_REFERENCE"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, String.valueOf(tx.getID())) + " removed " + rows + " row(s)"); }
public void rollbackTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Rolling back transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.get...
if (log.isTraceEnabled()) { log.trace("Updated " + rows + " rows from DELIVERY"); }
if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql, null, String.valueOf(tx.getID())) + " updated " + rows + " row(s)"); }
public void rollbackTx(Transaction tx) throws Exception { if (log.isTraceEnabled()) { log.trace("Rolling back transaction:" + tx.getID()); } Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.get...
ic.close();
public void start() throws Exception { InitialContext ic = new InitialContext(); mgr = (TransactionManager)ic.lookup("java:/TransactionManager"); ds = (DataSource)ic.lookup("java:/DefaultDS"); Connection conn = null; String sql = null; TransactionWrapper tx = n...
ps.executeUpdate(); if (log.isTraceEnabled()) { log.trace(ps); }
int result = ps.executeUpdate(); if (log.isTraceEnabled()) { log.trace(JDBCUtil.statementToString(sql) + " inserted " + result + " row(s)"); }
public void store(Message m) throws Exception { Connection conn = null; PreparedStatement ps = null; TransactionWrapper wrap = new TransactionWrapper(); try { conn = ds.getConnection(); String sql = "INSERT INTO MESSAGE VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ...
Object getObject(String columnName) throws SQLException;
Object getObject(int columnIndex) throws SQLException;
Object getObject(String columnName) throws SQLException;
void setBoolean(int parameterIndex, boolean x) throws SQLException;
void setBoolean(int index, boolean value) throws SQLException;
void setBoolean(int parameterIndex, boolean x) throws SQLException;
this.destination = destination;
public ServerProducerDelegate(String id, Receiver destination, Destination jmsDestination, ServerSessionDelegate parent) { this.id = id; this.destination = destination; this.jmsDestination = jmsDestination; sessionEndpoint = parent; }
try { m.setJMSMessageID(generateMessageID()); m.setJMSDestination(jmsDestination); boolean acked = destination.handle((Routable)m); if (!acked) { log.debug("The message was not acknowledged"); } } catch(Throwable t) { log.error("Message handling failure", t); }
sessionEndpoint.sendMessage(m);
public void send(Message m) { if (log.isTraceEnabled()) { log.trace("sending message " + m + " to the core"); } try { // TODO JMS1.1 specs 3.4.3. If the client can live without a messageID, do not set a new messageID on the message m.setJMSMessageID(generateMessageID()); m.se...
sess.createConsumer(dest);
MessageConsumer cons = sess.createConsumer(dest);
private boolean canReadDestination(Connection conn, Destination dest) throws Exception { Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE); try { sess.createConsumer(dest); return true; } catch (JMSSecurityException e) { log.trace("Can't read d...
u.p("history:");
public void dumpHistory() { u.p( entries ); u.p( "current index = " + index ); }
public static boolean isNumber(int cssPrimitiveType) { switch ( cssPrimitiveType ) { case CSSPrimitiveValue.CSS_EMS: case CSSPrimitiveValue.CSS_EXS: case CSSPrimitiveValue.CSS_PERCENTAGE: return false; case CSSPrimitiveValue.CSS_PX: case CSSPrimitiveValue.CSS_IN: case CSSPrimitiveValue.CSS_CM: case CSSPrimitiveValu...
public static boolean isNumber(CSSPrimitiveValue cssValue) { return isNumber(cssValue.getPrimitiveType());
public static boolean isNumber(int cssPrimitiveType) { switch ( cssPrimitiveType ) { // fall thru on all these // relative length or size case CSSPrimitiveValue.CSS_EMS: case CSSPrimitiveValue.CSS_EXS: case CSSPrimitiveValue.CSS_PERCENTAGE: ...
return "DistributedQueue[" + getChannelID() + "]";
return "DistributedQueue[" + getChannelID() + ":" + Util.guidToString((String)peer.getID()) + "]";
public String toString() { return "DistributedQueue[" + getChannelID() + "]"; }
if (log.isTraceEnabled()) { log.trace(this + " remote browse" + (filter == null ? "" : ", filter = " + filter)); }
public List doRemoteBrowse(Filter filter) { RpcServerCall rpcServerCall = new RpcServerCall(queue.getDestinationID(), "remoteBrowse", new Object[] {getPeerIdentity(), filter}, new String[] {"org.jboss.messaging.core.distributed.PeerIdentity"...
super.join();
super.leave();
public synchronized void leave() throws DistributedException { if(!joined) { return; } super.join(); // do the generic stuff first // unregister my pipe output rpcServer.unregister(pipeID); rpcServer.unregister(queue.getDestinationID(), this); joined = false; }
Client client = (Client)invocation.getMetaData(MetaDataConstants.JMS, MetaDataConstants.INVOKER_CLIENT);
Client client = getState(invocation).getClient();
public Object handleSetExceptionListener(Invocation invocation) throws Throwable { justCreated = false; MethodInvocation mi = (MethodInvocation)invocation; exceptionListener = (ExceptionListener)mi.getArguments()[0]; Client client = (Client)invocation.getMetaData(M...
setDefaultIvyUserDir(new File(System.getProperty("user.home"), ".ivy")); Message.verbose("no default ivy user dir defined: set to "+_defaultUserDir);
if (getVariable("ivy.home") != null) { setDefaultIvyUserDir(new File(getVariable("ivy.home"))); Message.verbose("using ivy.default.ivy.user.dir variable for default ivy user dir: "+_defaultUserDir); } else { setDefaultIvyUserDir(new File(System.getProperty("user.home"), ".ivy")); Message.verbose("no default ivy user di...
public File getDefaultIvyUserDir() { if (_defaultUserDir==null) { setDefaultIvyUserDir(new File(System.getProperty("user.home"), ".ivy")); Message.verbose("no default ivy user dir defined: set to "+_defaultUserDir); } return _defaultUserDir; }
setVariable("ivy.home", _defaultUserDir.getAbsolutePath());
public void setDefaultIvyUserDir(File defaultUserDir) { _defaultUserDir = defaultUserDir; setVariable("ivy.default.ivy.user.dir", _defaultUserDir.getAbsolutePath()); }
Collection resolved = (Collection)_selectedDeps.get(new ModuleIdConf(mid, rootModuleConf));
Collection resolved = (Collection)_selectedRevs.get(new ModuleIdConf(mid, rootModuleConf));
public Collection getResolvedRevisions(ModuleId mid, String rootModuleConf) { Collection resolved = (Collection)_selectedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { Collection ret = new HashSet(); for (...
Collection ret = new HashSet(); for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); ret.add(node.getId()); ret.add(node.getResolvedId()); } return ret;
return new HashSet(resolved);
public Collection getResolvedRevisions(ModuleId mid, String rootModuleConf) { Collection resolved = (Collection)_selectedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { Collection ret = new HashSet(); for (...
public void markEvicted(EvictionData evictionData) { _evicted.put(evictionData.getRootModuleConf(), evictionData); if (!_rootModuleConfs.keySet().contains(evictionData.getRootModuleConf())) { _rootModuleConfs.put(evictionData.getRootModuleConf(), null); } if (evictionData.getSelected() != null) { for (Iterator iter =...
public void markEvicted(String rootModuleConf, IvyNode node, ConflictManager conflictManager, Collection resolved) { EvictionData evictionData = new EvictionData(rootModuleConf, node, conflictManager, resolved); markEvicted(evictionData);
public void markEvicted(EvictionData evictionData) { _evicted.put(evictionData.getRootModuleConf(), evictionData); if (!_rootModuleConfs.keySet().contains(evictionData.getRootModuleConf())) { _rootModuleConfs.put(evictionData.getRootModuleConf(), null); } // bug 105: u...
Collection resolved = (Collection)_evictedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) {
Collection evicted = (Collection)_evictedRevs.get(new ModuleIdConf(mid, rootModuleConf)); if (evicted == null) {
public Collection getEvictedRevisions(ModuleId mid, String rootModuleConf) { Collection resolved = (Collection)_evictedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { Collection ret = new HashSet(); for (It...
Collection ret = new HashSet(); for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); ret.add(node.getRealNode().getResolvedId()); } return ret;
return new HashSet(evicted);
public Collection getEvictedRevisions(ModuleId mid, String rootModuleConf) { Collection resolved = (Collection)_evictedDeps.get(new ModuleIdConf(mid, rootModuleConf)); if (resolved == null) { return new HashSet(); } else { Collection ret = new HashSet(); for (It...
public String[] getRequiredConfigurations() { Collection required = new ArrayList(_confsToFetch.size() + _fetchedConfigurations.size()); required.addAll(_fetchedConfigurations); required.addAll(_confsToFetch); return (String[])required.toArray(new String[required.size()]);
public String[] getRequiredConfigurations(IvyNode in, String inConf) { Collection req = (Collection)_requiredConfs.get(new NodeConf(in, inConf)); return req == null?new String[0]:(String[])req.toArray(new String[req.size()]);
public String[] getRequiredConfigurations() { Collection required = new ArrayList(_confsToFetch.size() + _fetchedConfigurations.size()); required.addAll(_fetchedConfigurations); required.addAll(_confsToFetch); return (String[])required.toArray(new String[required.size()]); }
stream = configuration.openStream();
stream = URLHandlerRegistry.getDefault().openStream(configuration);
public void parse(URL configuration) throws ParseException, IOException { // put every type definition from ivy to configurator Map typeDefs = _ivy.getTypeDefs(); for (Iterator iter = typeDefs.keySet().iterator(); iter.hasNext();) { String name = (String) iter.next(); _con...
public static void update(final Ivy ivy, URL srcURL, File destFile, final Map resolvedRevisions, final String status, final String revision, final Date pubdate, final Namespace ns, final boolean replaceInclude)
public static void update(URL srcURL, File destFile, final Map resolvedRevisions, final String status, final String revision, final Date pubdate)
public static void update(final Ivy ivy, URL srcURL, File destFile, final Map resolvedRevisions, final String status, final String revision, final Date pubdate, final Namespace ns, final boolean replaceInclude) throws IOException, SAXException { if (destFile.getPar...
if (destFile.getParentFile() != null) { destFile.getParentFile().mkdirs(); } FileOutputStream fos = null; try { fos = new FileOutputStream(destFile); final PrintWriter out = new PrintWriter(fos); copyHeader(srcURL, out); XMLHelper.parse(srcURL, null, new DefaultHandler() { private String _organisation = null; priva...
update(null, srcURL, destFile, resolvedRevisions, status, revision, pubdate, null, false);
public static void update(final Ivy ivy, URL srcURL, File destFile, final Map resolvedRevisions, final String status, final String revision, final Date pubdate, final Namespace ns, final boolean replaceInclude) throws IOException, SAXException { if (destFile.getPar...
public DefaultModuleRevision(DependencyResolver resolver, ModuleDescriptor descriptor, boolean searched, boolean downloaded) {
public DefaultModuleRevision(DependencyResolver resolver, DependencyResolver artifactResolver, ModuleDescriptor descriptor, boolean searched, boolean downloaded) {
public DefaultModuleRevision(DependencyResolver resolver, ModuleDescriptor descriptor, boolean searched, boolean downloaded) { _resolver = resolver; _descriptor = descriptor; _isSearched = searched; _isDownloaded = downloaded; }
_artifactResolver = artifactResolver;
public DefaultModuleRevision(DependencyResolver resolver, ModuleDescriptor descriptor, boolean searched, boolean downloaded) { _resolver = resolver; _descriptor = descriptor; _isSearched = searched; _isDownloaded = downloaded; }
public IvyNode(ResolveData data, ModuleDescriptor md) { _id = md.getModuleRevisionId(); _md = md; _isRoot = true; _root = this; init(data, false);
public IvyNode(ResolveData data, DependencyDescriptor dd) { _id = dd.getDependencyRevisionId(); _dd = dd; _isRoot = false; init(data, true);
public IvyNode(ResolveData data, ModuleDescriptor md) { _id = md.getModuleRevisionId(); _md = md; _isRoot = true; _root = this; // we do not register nodes created from ModuleDescriptor, cause they are // the root of resolve init(data, false); }
_selectedDeps.put(new ModuleIdConf(moduleId, rootModuleConf), new HashSet(resolved));
ModuleIdConf moduleIdConf = new ModuleIdConf(moduleId, rootModuleConf); _selectedDeps.put(moduleIdConf, new HashSet(resolved)); Collection resolvedRevs = new HashSet(); for (Iterator iter = resolved.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); resolvedRevs.add(node.getId()); resolvedRevs.add(node...
public void setResolvedNodes(ModuleId moduleId, String rootModuleConf, Collection resolved) { _selectedDeps.put(new ModuleIdConf(moduleId, rootModuleConf), new HashSet(resolved)); }
_evictedDeps.put(new ModuleIdConf(moduleId, rootModuleConf), new HashSet(evicted));
ModuleIdConf moduleIdConf = new ModuleIdConf(moduleId, rootModuleConf); _evictedDeps.put(moduleIdConf, new HashSet(evicted)); Collection evictedRevs = new HashSet(); for (Iterator iter = evicted.iterator(); iter.hasNext();) { IvyNode node = (IvyNode)iter.next(); evictedRevs.add(node.getId()); evictedRevs.add(node.getRe...
public void setEvictedNodes(ModuleId moduleId, String rootModuleConf, Collection evicted) { _evictedDeps.put(new ModuleIdConf(moduleId, rootModuleConf), new HashSet(evicted)); }
Attribute get (Class Category);
Attribute get (Class category);
Attribute get (Class Category);
boolean remove (Class category);
boolean remove (Attribute attribute);
boolean remove (Class category);
Prime2.isProbablePrime(p) && p.gcd(E).equals(ONE))
p.isProbablePrime(80) && p.gcd(E).equals(ONE))
static KeyPair generateRSAKeyPair() { BigInteger p, q, n, d; // Simplified version of GNU Crypto's RSAKeyPairGenerator. int M = 256; BigInteger lower = TWO.pow(255); BigInteger upper = TWO.pow(256).subtract(ONE); byte[] kb = new byte[32]; while (true) { nextBytes(kb); p = new ...
if (n.bitLength() == 512 && Prime2.isProbablePrime(q) &&
if (n.bitLength() == 512 && q.isProbablePrime(80) &&
static KeyPair generateRSAKeyPair() { BigInteger p, q, n, d; // Simplified version of GNU Crypto's RSAKeyPairGenerator. int M = 256; BigInteger lower = TWO.pow(255); BigInteger upper = TWO.pow(256).subtract(ONE); byte[] kb = new byte[32]; while (true) { nextBytes(kb); p = new ...
close();
if (!closed) { close(); }
protected void remove() throws JMSException { if (trace) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); try ...
if (wereDeliveries) { channel.deliver(); }
protected void remove() throws JMSException { if (trace) log.trace("attempting to remove receiver " + this + " from destination " + channel); for(Iterator i = deliveries.values().iterator(); i.hasNext(); ) { SingleReceiverDelivery d = (SingleReceiverDelivery)i.next(); try ...
if (log.isTraceEnabled()) { log.trace("committing " + this); }
if (trace) { log.trace("committing " + this); }
public void commit() throws Exception { if (state == STATE_ROLLBACK_ONLY) { throw new TransactionException("Transaction marked rollback only, cannot commit"); } if (log.isTraceEnabled()) { log.trace("committing " + this); } //TODO - commit the tx in the database state = ...
if (log.isTraceEnabled()) { log.trace("rolling back " + this); }
if (trace) { log.trace("rolling back " + this); }
public void rollback() throws Exception { //TODO - rollback the tx in the database if (log.isTraceEnabled()) { log.trace("rolling back " + this); } state = STATE_ROLLEDBACK; if (insertedTXRecord) { transactionLog.rollbackTx(this); } Iterator iter = callbacks.i...
if (log.isTraceEnabled()) { log.trace("setting rollback_only on " + this); }
if (trace) { log.trace("setting rollback_only on " + this); }
public void setRollbackOnly() throws Exception { if (log.isTraceEnabled()) { log.trace("setting rollback_only on " + this); } state = STATE_ROLLBACK_ONLY; }
pm.addReferences(channelID, toAdd, true);
pm.pageReferences(channelID, toAdd, true);
protected void flushDownCache() throws Exception { if (trace) { log.trace(this + " flushing " + downCache.size() + " refs from downcache"); } // Non persistent refs won't already be in the db so they need to be inserted // Persistent refs in a recoverable state will already be there so need to ...
pm.removeReferences(channelID, toRemove);
pm.removeDepagedReferences(channelID, toRemove);
protected void loadPagedReferences(long number) throws Exception { if (trace) { log.trace(this + " Loading " + number + " paged references from storage"); } // Must flush the down cache first flushDownCache(); List refInfos = pm.getPagedReferenceInfos(channelID, firstPagingOrder, number);...
public void paintAlternateFlows(RenderingContext c, Layer root, int additionalClearance) { paintTopFlow(c, root, additionalClearance); paintBottomFlow(c, root, additionalClearance); paintLeftFlow(c, root, additionalClearance); paintRightFlow(c, root, additionalClearance);
public void paintAlternateFlows(RenderingContext c, Layer root, short mode) { paintAlternateFlows(c, root, mode, 0);
public void paintAlternateFlows(RenderingContext c, Layer root, int additionalClearance) { paintTopFlow(c, root, additionalClearance); paintBottomFlow(c, root, additionalClearance); paintLeftFlow(c, root, additionalClearance); paintRightFlow(c, root, additionalClearance); }
private void paintBottomFlow(RenderingContext c, Layer root, int additionalClearance) {
private void paintBottomFlow(RenderingContext c, Layer root, short mode, int additionalClearance) {
private void paintBottomFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_BOTTOM); if (! flowName.equals("none")) { int left = additionalClearance + (int)g...
int top = getPaintingBottom() - (int)getStyle().getMarginWidth(c).bottom();
int top; if (mode == Layer.PAGED_MODE_SCREEN) { top = getPaintingBottom() - (int)getStyle().getMarginWidth(c).bottom(); } else if (mode == Layer.PAGED_MODE_PRINT) { top = getHeight(c) - (int)getStyle().getMarginWidth(c).bottom(); } else { throw new IllegalArgumentException("Illegal mode"); }
private void paintBottomFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_BOTTOM); if (! flowName.equals("none")) { int left = additionalClearance + (int)g...
private void paintLeftFlow(RenderingContext c, Layer root, int additionalClearance) {
private void paintLeftFlow(RenderingContext c, Layer root, short mode, int additionalClearance) {
private void paintLeftFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_LEFT); if (! flowName.equals("none")) { int left = additionalClearance; ...
int top = getPaintingTop() + (int)getStyle().getMarginWidth(c).top();
int top; if (mode == Layer.PAGED_MODE_SCREEN) { top = getPaintingTop() + (int)getStyle().getMarginWidth(c).top(); } else if (mode == Layer.PAGED_MODE_PRINT) { top = (int)getStyle().getMarginWidth(c).top(); } else { throw new IllegalArgumentException("Illegal mode"); }
private void paintLeftFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_LEFT); if (! flowName.equals("none")) { int left = additionalClearance; ...
private void paintRightFlow(RenderingContext c, Layer root, int additionalClearance) {
private void paintRightFlow(RenderingContext c, Layer root, short mode, int additionalClearance) {
private void paintRightFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_RIGHT); if (! flowName.equals("none")) { int left = additionalClearance + getWidth...
int top = getPaintingTop() + (int)getStyle().getMarginWidth(c).top();
int top; if (mode == Layer.PAGED_MODE_SCREEN) { top = getPaintingTop() + (int)getStyle().getMarginWidth(c).top(); } else if (mode == Layer.PAGED_MODE_PRINT) { top = (int)getStyle().getMarginWidth(c).top(); } else { throw new IllegalArgumentException("Illegal mode"); }
private void paintRightFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_RIGHT); if (! flowName.equals("none")) { int left = additionalClearance + getWidth...
private void paintTopFlow(RenderingContext c, Layer root, int additionalClearance) {
private void paintTopFlow(RenderingContext c, Layer root, short mode, int additionalClearance) {
private void paintTopFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_TOP); if (! flowName.equals("none")) { int left = additionalClearance + (int)getStyl...
int top = getPaintingTop();
int top; if (mode == Layer.PAGED_MODE_SCREEN) { top = getPaintingTop(); } else if (mode == Layer.PAGED_MODE_PRINT) { top = 0; } else { throw new IllegalArgumentException("Illegal mode"); }
private void paintTopFlow(RenderingContext c, Layer root, int additionalClearance) { CalculatedStyle style = getStyle().getCalculatedStyle(); String flowName = style.getStringProperty(CSSName.FS_FLOW_TOP); if (! flowName.equals("none")) { int left = additionalClearance + (int)getStyl...
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cinit-ex");
public final boolean writeClassInitialize(VmMethod method) { if (method.isStatic() && !method.isInitializer()) { final VmType< ? > cls = method.getDeclaringClass(); if (!cls.isInitialized()) { final GPR aax = this.AAX; final Label label = genLabel("$$class-init");
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { // Create jump labels final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cini...
os.writeTEST(BITS32, classReg, entryPoints.getVmTypeState() .getOffset(), VmTypeState.ST_INITIALIZED); os.writeJCC(doInit, X86Constants.JZ); os.writeJMP(done); os.setObjectRef(doInit); Label initializer = classInitLabels.get(cls); if (initializer == null) { initializer = genLabel("$$init-" + cls.getName()); ...
os.writePUSH(aax); if (os.isCode32()) { writeGetStaticsEntry(label, aax, cls); } else { writeGetStaticsEntry64(label, (GPR64)aax, cls); } writeClassInitialize(label, aax, cls); os.writePOP(aax); return true;
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { // Create jump labels final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cini...
os.writeCALL(initializer); os.setObjectRef(done);
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { // Create jump labels final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cini...
return false;
public final void writeClassInitialize(Label curInstrLabel, GPR classReg, VmType< ? > cls) { if (!cls.isInitialized()) { // Create jump labels final Label doInit = new Label(curInstrLabel + "$$do-cinit-ex"); final Label done = new Label(curInstrLabel + "$$done-cini...
writeGetStaticsEntry(label, AAX, entry.getKey());
if (os.isCode32()) { writeGetStaticsEntry(label, AAX, entry.getKey()); } else { writeGetStaticsEntry64(label, (GPR64)AAX, entry.getKey()); }
public final void writeClassInitializers() { for (Map.Entry<VmType<?>, Label> entry : classInitLabels.entrySet()) { final Label label = entry.getValue(); // Set label os.setObjectRef(label); // Save registers if (os.isCode32()) { os.writeP...
TransactionManager tm = getTransactionManagerReference();
private TransactionWrapper() throws Exception { oldTx = tm.suspend(); tm.begin(); }
if (oldTx != null)
if (oldTx != null && tm != null)
private void end() throws Exception { try { if (Status.STATUS_MARKED_ROLLBACK == tm.getStatus()) { failed = true; tm.rollback(); } else { tm.commit(); } } ...
tm.setRollbackOnly();
getTransactionManagerReference().setRollbackOnly();
private void exceptionOccurred() throws Exception { tm.setRollbackOnly(); }
int innerCount = 0;
public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ...
innerCount++;
public List getMessages(List messageIds) throws Exception { if (trace) { log.trace("Getting batch of messages for " + messageIds); } Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; TransactionWrapper wrap = new TransactionWrapper(); ...
TransactionManagerServiceMBean tms = (TransactionManagerServiceMBean) MBeanServerInvocationHandler .newProxyInstance(getServer(), tmObjectName, TransactionManagerServiceMBean.class, false); tm = tms.getTransactionManager();
public void setTransactionManager(ObjectName tmObjectName) throws Exception { this.tmObjectName = tmObjectName; TransactionManagerServiceMBean tms = (TransactionManagerServiceMBean) MBeanServerInvocationHandler .newProxyInstance(getServer(), tmObjectName, TransactionManagerServiceMBean.class, ...
if (tm == null) { throw new Exception("No TransactionManager found. This service dependencies must " + "have not been enforced correctly!"); }
protected void startService() throws Exception { if (ds == null) { InitialContext ic = new InitialContext(); ds = (DataSource) ic.lookup(dataSourceJNDIName); ic.close(); } if (ds == null) { throw new Exception("No DataSource found. This service depende...
String title = "";
String title = "TITLE UNKNOWN";
public String getDocumentTitle(org.w3c.dom.Document doc) { String title = ""; try { //org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "//xh:head/xh:title/text()", pres); org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "/...
org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), " org.w3c.dom.NodeList nl = xo.nodelist(); if (nl.getLength() == 0) { System.err.println("Apparently no title element for this document."); title = "TITLE UNKNOWN"; } else {
for (int i = 0; i < 1; i++) { Element html = doc.getDocumentElement(); NodeList nl = html.getElementsByTagName("head"); if (nl.getLength() == 0) break; nl = ((Element) nl.item(0)).getElementsByTagName("title"); if (nl.getLength() == 0) break; nl = ((Element) nl.item(0)).getChildNodes(); if (nl.getLength() == 0) break;
public String getDocumentTitle(org.w3c.dom.Document doc) { String title = ""; try { //org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "//xh:head/xh:title/text()", pres); org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "/...
try { org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), " org.w3c.dom.NodeList nl = xo.nodelist(); for (int i = 0, len = nl.getLength(); i < len; i++) { StringBuffer style = new StringBuffer(); org.w3c.dom.Element elem = (org.w3c.dom.Element) nl.item(i); String m = elem.getAttribute("media...
org.w3c.dom.NodeList nl = null; for (int i = 0; i < 1; i++) { Element html = doc.getDocumentElement(); nl = html.getElementsByTagName("head"); if (nl.getLength() == 0) break; nl = ((Element) nl.item(0)).getElementsByTagName("style"); } for (int i = 0, len = nl.getLength(); i < len; i++) { StringBuffer style = new Strin...
public InlineStyleInfo[] getInlineStyle(org.w3c.dom.Document doc) { List list = new ArrayList(); try { //org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "//xh:style[@type='text/css']", pres); //NOTE: type is required and we only handle css ...
InlineStyleInfo isi = new InlineStyleInfo(); isi.setInfo(info); isi.setStyle(style.toString()); list.add(isi);
public InlineStyleInfo[] getInlineStyle(org.w3c.dom.Document doc) { List list = new ArrayList(); try { //org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "//xh:style[@type='text/css']", pres); //NOTE: type is required and we only handle css ...
} catch (Exception ex) { ex.printStackTrace();
InlineStyleInfo isi = new InlineStyleInfo(); isi.setInfo(info); isi.setStyle(style.toString()); list.add(isi);
public InlineStyleInfo[] getInlineStyle(org.w3c.dom.Document doc) { List list = new ArrayList(); try { //org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), "//xh:style[@type='text/css']", pres); //NOTE: type is required and we only handle css ...
try { org.apache.xpath.objects.XObject xo = XPathAPI.eval(doc.getDocumentElement(), " org.w3c.dom.NodeList nl = xo.nodelist(); for (int i = 0, len = nl.getLength(); i < len; i++) { StylesheetInfo info = new StylesheetInfo(); info.setOrigin(StylesheetInfo.AUTHOR); org.w3c.dom.Element link = (org.w3c.dom.Element) nl.it...
org.w3c.dom.NodeList nl = null; for (int i = 0; i < 1; i++) { Element html = doc.getDocumentElement(); nl = html.getElementsByTagName("head"); if (nl.getLength() == 0) break; nl = ((Element) nl.item(0)).getElementsByTagName("link"); } for (int i = 0, len = nl.getLength(); i < len; i++) { Element link = (Element) nl.ite...
public StylesheetInfo[] getStylesheetLinks(org.w3c.dom.Document doc) { List list = new ArrayList(); //get the processing-instructions (actually for XmlDocuments) StylesheetInfo[] refs = super.getStylesheetLinks(doc); list.addAll(java.util.Arrays.asList(refs)); //get the link eleme...
XhtmlForm(Context c, Element e) {
public XhtmlForm(Context c, Element e) {
XhtmlForm(Context c, Element e) { uac = c.getRenderingContext().getUac(); formElement = e; }
JComponent addComponent(Context c, Element e) {
public JComponent addComponent(Context c, Element e) {
JComponent addComponent(Context c, Element e) { JComponent cc = (JComponent) components.get(e); if (cc != null) { return cc; } if (e.getNodeName().equals("input")) { String type = e.getAttribute("type"); if (type == null || type.equals("")) { ...
if (buttonGroups == null) { buttonGroups = new HashMap(); } String name = e.getAttribute("name"); ButtonGroup group = (ButtonGroup) buttonGroups.get(name); if (group == null) { group = new ButtonGroup(); buttonGroups.put(name, group); } group.add(radio);
JComponent addComponent(Context c, Element e) { JComponent cc = (JComponent) components.get(e); if (cc != null) { return cc; } if (e.getNodeName().equals("input")) { String type = e.getAttribute("type"); if (type == null || type.equals("")) { ...
public java.io.Reader getDefaultStylesheet() {
public InputStream getDefaultStylesheet() {
public java.io.Reader getDefaultStylesheet() { return null; }
int pos = rootView.getNextVisualPositionFrom(c, offs,
int pos = rootView.getNextVisualPositionFrom(offs,
public static final int getPositionAbove(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(c, offs, ...
SwingUtilities.calculateInnerArea(c, null),
public static final int getPositionAbove(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(c, offs, ...
int pos = rootView.getNextVisualPositionFrom(c, offs,
int pos = rootView.getNextVisualPositionFrom(offs,
public static final int getPositionBelow(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(c, offs, ...
SwingUtilities.calculateInnerArea(c, null),
public static final int getPositionBelow(JTextComponent c, int offset, int x) throws BadLocationException { View rootView = c.getUI().getRootView(c); Rectangle r = c.modelToView(offset); int offs = c.viewToModel(new Point(x, r.y)); int pos = rootView.getNextVisualPositionFrom(c, offs, ...
{ return (TextUI) ui;
{ return (TextUI) UIManager.getUI(this);
public TextUI getUI() { return (TextUI) ui; }
setContent(content); setNode(content.getElement());
public AnonymousBlockBox(Content content) { super(); setContent(content); setNode(content.getElement()); /* * while(true) { * Node sibling = startNode.getNextSibling(); * if(sibling == null) { break; } * if(Layout.isBlockNode(sibling,c)) { break; } ...
public Attribute get(String attrID);
Attribute get(String attrID);
public Attribute get(String attrID);
public Attribute remove(String attrID);
Attribute remove(String attrID);
public Attribute remove(String attrID);
System.out.println("Getting child");
protected void maintainRelatives(Invocation invocation) { //Get the InvocationHandler for this invocation JMSInvocationHandler thisHandler = ((JMSMethodInvocation)invocation).getHandler(); //We use a clone to avoid a deadlock where requests //are made to clo...
if (splitPane.isOneTouchExpandable()) { ((BasicArrowButton) rightButton).paint(g); ((BasicArrowButton) leftButton).paint(g); }
public void paint(Graphics g) { Dimension dividerSize; super.paint(g); if (border != null) { dividerSize = getSize(); border.paintBorder(this, g, 0, 0, dividerSize.width, dividerSize.height); } }
protected boolean disablePointer() {
protected boolean disablePointer() throws DeviceException { log.debug("disablePointer");
protected boolean disablePointer() { return bus.writeMouseCommand(CMD_DISABLE); }
protected boolean enablePointer() {
protected boolean enablePointer() throws DeviceException { log.debug("enablePointer");
protected boolean enablePointer() { return bus.writeMouseCommand(CMD_ENABLE); }
if (!bus.writeMouseCommand(CMD_GET_ID)) { throw new DriverException("Cannot request Pointer ID"); }
protected int getPointerId() throws DriverException { if (!bus.writeMouseCommand(CMD_GET_ID)) { throw new DriverException("Cannot request Pointer ID"); } try { return channel.read(50); } catch (IOException ex) { throw new DriverException("Error in requesting Pointer ID", ex); } catch (TimeoutException ex) {...
} catch (DeviceException ex) { throw new DriverException("Error in requesting Pointer ID", ex);
protected int getPointerId() throws DriverException { if (!bus.writeMouseCommand(CMD_GET_ID)) { throw new DriverException("Cannot request Pointer ID"); } try { return channel.read(50); } catch (IOException ex) { throw new DriverException("Error in requesting Pointer ID", ex); } catch (TimeoutException ex) {...
protected boolean initPointer() {
protected boolean initPointer() throws DeviceException {
protected boolean initPointer() { boolean result = enablePointer(); result &= setRate(100); return result; }
protected boolean setRate(int samples) {
protected boolean setRate(int samples) throws DeviceException {
protected boolean setRate(int samples) { return bus.writeMouseCommands(new int[] { CMD_SET_RATE, samples }); }